pub enum UnOp {
Not,
Neg,
BitNot,
Plus,
PreInc,
PreDec,
PostInc,
PostDec,
}Expand description
一元运算符。
Variants§
Not
Neg
BitNot
Plus
一元 +(数值提升——char/byte/short 提升 int;装箱类型改变
Object o = +c → Integer 而非 Character)。恒等但静态类型敏感,
不可丢弃。
PreInc
++x(读+写)
PreDec
PostInc
x++(读+写)
PostDec
Implementations§
Trait Implementations§
impl Copy for UnOp
impl Eq for UnOp
impl StructuralPartialEq for UnOp
Auto Trait Implementations§
impl Freeze for UnOp
impl RefUnwindSafe for UnOp
impl Send for UnOp
impl Sync for UnOp
impl Unpin for UnOp
impl UnsafeUnpin for UnOp
impl UnwindSafe for UnOp
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