Trait Literal

Source
pub trait Literal: Sized + Clone {
    type F;

    // Required methods
    fn literal(x: Self::F) -> Self;
    fn to_literal(self) -> Result<Self::F, Self>;
    fn to_literal_ref(&self) -> Option<&Self::F>;
    fn as_literal(&self, constants: &Constants<Self::F>) -> Self;
}

Required Associated Types§

Source

type F

Required Methods§

Source

fn literal(x: Self::F) -> Self

Source

fn to_literal(self) -> Result<Self::F, Self>

Source

fn to_literal_ref(&self) -> Option<&Self::F>

Source

fn as_literal(&self, constants: &Constants<Self::F>) -> Self

Obtains the representation of some constants as a literal. This is useful before converting Kimchi expressions with constants to folding compatible expressions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, F: Clone, ChallengeTerm: AlphaChallengeTerm<'a>> Literal for ConstantExprInner<F, ChallengeTerm>

Source§

type F = F

Source§

impl<F: Clone> Literal for ConstantTerm<F>

Source§

type F = F

Source§

impl<F: Field> Literal for F

Source§

type F = F

Source§

impl<T: Literal + Clone> Literal for Operations<T>

Source§

type F = <T as Literal>::F

Source§

impl<T: Literal, Column: Clone> Literal for ExprInner<T, Column>

Source§

type F = <T as Literal>::F