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
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more