Enum rustpython_ast::UnaryOp
source · pub enum UnaryOp {
Invert,
Not,
UAdd,
USub,
}
Expand description
See also unaryop
Variants§
Implementations§
source§impl UnaryOp
impl UnaryOp
pub const fn invert(&self) -> Option<UnaryOpInvert>
pub const fn not(&self) -> Option<UnaryOpNot>
pub const fn u_add(&self) -> Option<UnaryOpUAdd>
pub const fn u_sub(&self) -> Option<UnaryOpUSub>
Trait Implementations§
source§impl From<UnaryOpInvert> for UnaryOp
impl From<UnaryOpInvert> for UnaryOp
source§fn from(_: UnaryOpInvert) -> Self
fn from(_: UnaryOpInvert) -> Self
Converts to this type from the input type.
source§impl From<UnaryOpNot> for UnaryOp
impl From<UnaryOpNot> for UnaryOp
source§fn from(_: UnaryOpNot) -> Self
fn from(_: UnaryOpNot) -> Self
Converts to this type from the input type.
source§impl From<UnaryOpUAdd> for UnaryOp
impl From<UnaryOpUAdd> for UnaryOp
source§fn from(_: UnaryOpUAdd) -> Self
fn from(_: UnaryOpUAdd) -> Self
Converts to this type from the input type.
source§impl From<UnaryOpUSub> for UnaryOp
impl From<UnaryOpUSub> for UnaryOp
source§fn from(_: UnaryOpUSub) -> Self
fn from(_: UnaryOpUSub) -> Self
Converts to this type from the input type.
source§impl PartialEq<UnaryOp> for UnaryOpInvert
impl PartialEq<UnaryOp> for UnaryOpInvert
source§impl PartialEq<UnaryOp> for UnaryOpNot
impl PartialEq<UnaryOp> for UnaryOpNot
source§impl PartialEq<UnaryOp> for UnaryOpUAdd
impl PartialEq<UnaryOp> for UnaryOpUAdd
source§impl PartialEq<UnaryOp> for UnaryOpUSub
impl PartialEq<UnaryOp> for UnaryOpUSub
source§impl PartialEq for UnaryOp
impl PartialEq for UnaryOp
impl Copy for UnaryOp
impl Eq for UnaryOp
impl StructuralPartialEq for UnaryOp
Auto Trait Implementations§
impl Freeze for UnaryOp
impl RefUnwindSafe for UnaryOp
impl Send for UnaryOp
impl Sync for UnaryOp
impl Unpin for UnaryOp
impl UnwindSafe for UnaryOp
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