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.