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§
Required Methods§
fn literal(x: Self::F) -> Self
fn to_literal(self) -> Result<Self::F, Self>
fn to_literal_ref(&self) -> Option<&Self::F>
Sourcefn as_literal(&self, constants: &Constants<Self::F>) -> Self
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.