pub struct ValueNumberReductionOp {
pub operator: Symbol,
pub operand_domain: Symbol,
pub cost: u16,
pub apply: fn(&mut Cx, Vec<Value>) -> Result<Value>,
}Expand description
A value-level reduction over a homogeneous list of operands.
Fields§
§operator: SymbolOperator symbol this rule implements.
operand_domain: SymbolRequired domain of every operand.
cost: u16Relative cost, used to rank competing implementations.
apply: fn(&mut Cx, Vec<Value>) -> Result<Value>Folds the operator over a vector of domain values.
Trait Implementations§
Source§impl Clone for ValueNumberReductionOp
impl Clone for ValueNumberReductionOp
Source§fn clone(&self) -> ValueNumberReductionOp
fn clone(&self) -> ValueNumberReductionOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValueNumberReductionOp
impl RefUnwindSafe for ValueNumberReductionOp
impl Send for ValueNumberReductionOp
impl Sync for ValueNumberReductionOp
impl Unpin for ValueNumberReductionOp
impl UnsafeUnpin for ValueNumberReductionOp
impl UnwindSafe for ValueNumberReductionOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more