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