pub enum UnaryOp {
IncrementPost,
IncrementPre,
DecrementPost,
DecrementPre,
Minus,
Plus,
Not,
}
Expand description
A unary operation on a single value
Variants
IncrementPost
a++
- increment the value
IncrementPre
++a
- increment the value
DecrementPost
a--
- decrement the value
DecrementPre
--a
- decrement the value
Minus
-a
- negate the value
Plus
+a
- convert to a number
Not
!a
- get the opposite of the boolean value
Trait Implementations
sourceimpl Trace for UnaryOp
impl Trace for UnaryOp
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for UnaryOp
Auto Trait Implementations
impl RefUnwindSafe for UnaryOp
impl Send for UnaryOp
impl Sync for UnaryOp
impl Unpin for UnaryOp
impl UnwindSafe for UnaryOp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more