pub struct ValueNumberUnaryOp {
pub operator: Symbol,
pub operand_domain: Symbol,
pub cost: u16,
pub apply: fn(&mut Cx, Value) -> Result<Value>,
}Expand description
A value-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, Value) -> Result<Value>Applies the operator to a single domain value.
Trait Implementations§
Source§impl Clone for ValueNumberUnaryOp
impl Clone for ValueNumberUnaryOp
Source§fn clone(&self) -> ValueNumberUnaryOp
fn clone(&self) -> ValueNumberUnaryOp
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 ValueNumberUnaryOp
impl RefUnwindSafe for ValueNumberUnaryOp
impl Send for ValueNumberUnaryOp
impl Sync for ValueNumberUnaryOp
impl Unpin for ValueNumberUnaryOp
impl UnsafeUnpin for ValueNumberUnaryOp
impl UnwindSafe for ValueNumberUnaryOp
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