pub enum Operator {
Show 13 variants
Add,
Sub,
Mult,
MatMult,
Div,
Mod,
Pow,
LShift,
RShift,
BitOr,
BitXor,
BitAnd,
FloorDiv,
}Expand description
See also operator
Variants§
Implementations§
Source§impl Operator
impl Operator
Sourcepub const fn is_mat_mult(&self) -> bool
pub const fn is_mat_mult(&self) -> bool
Returns true if self is of variant MatMult.
Sourcepub const fn is_l_shift(&self) -> bool
pub const fn is_l_shift(&self) -> bool
Returns true if self is of variant LShift.
Sourcepub const fn is_r_shift(&self) -> bool
pub const fn is_r_shift(&self) -> bool
Returns true if self is of variant RShift.
Sourcepub const fn is_bit_xor(&self) -> bool
pub const fn is_bit_xor(&self) -> bool
Returns true if self is of variant BitXor.
Sourcepub const fn is_bit_and(&self) -> bool
pub const fn is_bit_and(&self) -> bool
Returns true if self is of variant BitAnd.
Sourcepub const fn is_floor_div(&self) -> bool
pub const fn is_floor_div(&self) -> bool
Returns true if self is of variant FloorDiv.
Trait Implementations§
Source§impl From<Operator> for ComparableOperator
impl From<Operator> for ComparableOperator
Source§impl From<Operator> for OperatorPrecedence
impl From<Operator> for OperatorPrecedence
impl Copy for Operator
impl Eq for Operator
impl StructuralPartialEq for Operator
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
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§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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more