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::IncomingPorts,
try to evaluate the operation.