Trait kimchi::circuits::expr::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.

Implementors§

source§

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

§

type F = F

source§

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

§

type F = F

source§

impl<F: Field> Literal for F

§

type F = F

source§

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

§

type F = <T as Literal>::F

source§

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

§

type F = <T as Literal>::F