pub struct NumberReductionOp {
pub operator: Symbol,
pub operand_domain: Symbol,
pub cost: u16,
pub apply: fn(&mut Cx, Vec<NumberLiteral>) -> Result<Value>,
}Expand description
A literal-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<NumberLiteral>) -> Result<Value>Folds the operator over a vector of domain literals.
Trait Implementations§
Source§impl Clone for NumberReductionOp
impl Clone for NumberReductionOp
Source§fn clone(&self) -> NumberReductionOp
fn clone(&self) -> NumberReductionOp
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 NumberReductionOp
impl RefUnwindSafe for NumberReductionOp
impl Send for NumberReductionOp
impl Sync for NumberReductionOp
impl Unpin for NumberReductionOp
impl UnsafeUnpin for NumberReductionOp
impl UnwindSafe for NumberReductionOp
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