pub enum BinaryOp {
Show 18 variants
Add,
Sub,
Mul,
Div,
Mod,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
And,
Or,
BitAnd,
BitOr,
BitXor,
Shl,
Shr,
}Expand description
Binary operators, grouped by category.
Variants§
Add
+
Sub
-
Mul
*
Div
/
Mod
%
Eq
==
Ne
!=
Lt
<
Le
<=
Gt
>
Ge
>=
And
&&
Or
||
BitAnd
&
BitOr
|
BitXor
^
Shl
<<
Shr
>>
Implementations§
Source§impl BinaryOp
impl BinaryOp
Sourcepub fn is_comparison(self) -> bool
pub fn is_comparison(self) -> bool
== != < <= > >=: the operators that give a bool from two values
of one type.
Sourcepub fn is_logical(self) -> bool
pub fn is_logical(self) -> bool
&& ||: the operators over two bools.
Trait Implementations§
impl Copy for BinaryOp
impl Eq for BinaryOp
impl StructuralPartialEq for BinaryOp
Auto Trait Implementations§
impl Freeze for BinaryOp
impl RefUnwindSafe for BinaryOp
impl Send for BinaryOp
impl Sync for BinaryOp
impl Unpin for BinaryOp
impl UnsafeUnpin for BinaryOp
impl UnwindSafe for BinaryOp
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.