pub trait ConstFold: Send + Sync {
// Required method
fn fold(
&self,
type_args: &[TypeArg],
consts: &[(IncomingPort, Value)],
) -> ConstFoldResult;
}
Expand description
Trait implemented by extension operations that can perform constant folding.
Required Methods§
Sourcefn fold(
&self,
type_args: &[TypeArg],
consts: &[(IncomingPort, Value)],
) -> ConstFoldResult
fn fold( &self, type_args: &[TypeArg], consts: &[(IncomingPort, Value)], ) -> ConstFoldResult
Given type arguments type_args
and
crate::ops::Const
values for inputs at crate::IncomingPort
s,
try to evaluate the operation.
Trait Implementations§
Implementors§
impl ConstFold for LogicOp
impl ConstFold for TupleOpDef
impl ConstFold for LoadNatDef
impl ConstFold for NoopDef
impl ConstFold for Folder
impl<T> ConstFold for T
Blanket implementation for functions that only require the constants to evaluate - type arguments are not relevant.