#[non_exhaustive]#[repr(C)]pub enum BinaryOp {
Arith(Arithmetic),
ArithAssign(ArithmeticAssign),
Max,
Min,
And,
Or,
Xor,
Shl,
Shr,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl BinaryOp
impl BinaryOp
Sourcepub const fn is_arith(&self) -> bool
pub const fn is_arith(&self) -> bool
Returns true if the enum is BinaryOp::Arith otherwise false
Sourcepub const fn is_arith_assign(&self) -> bool
pub const fn is_arith_assign(&self) -> bool
Returns true if the enum is BinaryOp::ArithAssign otherwise false
Source§impl BinaryOp
impl BinaryOp
pub fn differentiable(&self) -> bool
pub fn is_commutative(&self) -> bool
pub fn arithmetic(inner: Arithmetic) -> Self
pub fn add() -> Self
pub fn div() -> Self
pub fn mul() -> Self
pub fn pow() -> Self
pub fn rem() -> Self
pub fn sub() -> Self
pub fn arithmetic_assign(inner: ArithmeticAssign) -> Self
pub fn add_assign() -> Self
pub fn div_assign() -> Self
pub fn mul_assign() -> Self
pub fn rem_assign() -> Self
pub fn sub_assign() -> Self
pub fn max() -> Self
pub fn min() -> Self
pub fn bitand() -> Self
pub fn bitor() -> Self
pub fn bitxor() -> Self
pub fn shl() -> Self
pub fn shr() -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BinaryOp
impl<'de> Deserialize<'de> for BinaryOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoEnumIterator for BinaryOp
impl IntoEnumIterator for BinaryOp
type Iterator = BinaryOpIter
fn iter() -> BinaryOpIter ⓘ
Source§impl Ord for BinaryOp
impl Ord for BinaryOp
Source§impl PartialOrd for BinaryOp
impl PartialOrd for BinaryOp
Source§impl VariantNames for BinaryOp
impl VariantNames for BinaryOp
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 UnwindSafe for BinaryOp
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