pub trait Variable<C: Config>: Clone {
type Expression: From<Self>;
// Required methods
fn uninit(builder: &mut Builder<C>) -> Self;
fn assign(&self, src: Self::Expression, builder: &mut Builder<C>);
fn assert_eq(
lhs: impl Into<Self::Expression>,
rhs: impl Into<Self::Expression>,
builder: &mut Builder<C>,
);
fn assert_ne(
lhs: impl Into<Self::Expression>,
rhs: impl Into<Self::Expression>,
builder: &mut Builder<C>,
);
// Provided method
fn eval(builder: &mut Builder<C>, expr: impl Into<Self::Expression>) -> Self { ... }
}
Required Associated Types§
type Expression: From<Self>
Required Methods§
fn uninit(builder: &mut Builder<C>) -> Self
fn assign(&self, src: Self::Expression, builder: &mut Builder<C>)
fn assert_eq( lhs: impl Into<Self::Expression>, rhs: impl Into<Self::Expression>, builder: &mut Builder<C>, )
fn assert_ne( lhs: impl Into<Self::Expression>, rhs: impl Into<Self::Expression>, builder: &mut Builder<C>, )
Provided Methods§
fn eval(builder: &mut Builder<C>, expr: impl Into<Self::Expression>) -> Self
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.