pub struct NumberBinaryOp {
pub operator: Symbol,
pub left_domain: Symbol,
pub right_domain: Symbol,
pub cost: u16,
pub apply: fn(&mut Cx, NumberLiteral, NumberLiteral) -> Result<Value>,
}Expand description
A literal-level binary operator keyed on both operand domains.
Fields§
§operator: SymbolOperator symbol this rule implements.
left_domain: SymbolRequired domain of the left operand.
right_domain: SymbolRequired domain of the right operand.
cost: u16Relative cost, used to rank competing implementations.
apply: fn(&mut Cx, NumberLiteral, NumberLiteral) -> Result<Value>Applies the operator to two domain literals.
Trait Implementations§
Source§impl Clone for NumberBinaryOp
impl Clone for NumberBinaryOp
Source§fn clone(&self) -> NumberBinaryOp
fn clone(&self) -> NumberBinaryOp
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 NumberBinaryOp
impl RefUnwindSafe for NumberBinaryOp
impl Send for NumberBinaryOp
impl Sync for NumberBinaryOp
impl Unpin for NumberBinaryOp
impl UnsafeUnpin for NumberBinaryOp
impl UnwindSafe for NumberBinaryOp
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