Enum acme_core::ops::binary::Arithmetic
source · #[repr(u8)]pub enum Arithmetic {
Add(Addition),
Div(Division),
Mul(Multiplication),
Rem(Remainder),
Sub(Subtraction),
}Variants§
Implementations§
source§impl Arithmetic
impl Arithmetic
source§impl Arithmetic
impl Arithmetic
pub fn add() -> Self
pub fn div() -> Self
pub fn mul() -> Self
pub fn rem() -> Self
pub fn sub() -> Self
pub fn eval<A, B, C>(&self, lhs: A, rhs: B) -> Cwhere
A: NumOps<B, C>,
pub fn op<A, B, C>(self) -> BoxedBinOp<A, B, C>where
A: NumOps<B, C>,
pub fn name(&self) -> &str
source§impl Arithmetic
impl Arithmetic
pub fn new(op: Arithmetic) -> Self
Trait Implementations§
source§impl Clone for Arithmetic
impl Clone for Arithmetic
source§fn clone(&self) -> Arithmetic
fn clone(&self) -> Arithmetic
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for Arithmetic
impl Debug for Arithmetic
source§impl<'de> Deserialize<'de> for Arithmetic
impl<'de> Deserialize<'de> for Arithmetic
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 Display for Arithmetic
impl Display for Arithmetic
source§impl Hash for Arithmetic
impl Hash for Arithmetic
source§impl IntoEnumIterator for Arithmetic
impl IntoEnumIterator for Arithmetic
type Iterator = ArithmeticIter
fn iter() -> ArithmeticIter ⓘ
source§impl Operator for Arithmetic
impl Operator for Arithmetic
source§impl Ord for Arithmetic
impl Ord for Arithmetic
source§fn cmp(&self, other: &Arithmetic) -> Ordering
fn cmp(&self, other: &Arithmetic) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Arithmetic
impl PartialEq for Arithmetic
source§fn eq(&self, other: &Arithmetic) -> bool
fn eq(&self, other: &Arithmetic) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for Arithmetic
impl PartialOrd for Arithmetic
source§fn partial_cmp(&self, other: &Arithmetic) -> Option<Ordering>
fn partial_cmp(&self, other: &Arithmetic) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for Arithmetic
impl Serialize for Arithmetic
source§impl VariantNames for Arithmetic
impl VariantNames for Arithmetic
impl Copy for Arithmetic
impl Eq for Arithmetic
impl StructuralPartialEq for Arithmetic
Auto Trait Implementations§
impl Freeze for Arithmetic
impl RefUnwindSafe for Arithmetic
impl Send for Arithmetic
impl Sync for Arithmetic
impl Unpin for Arithmetic
impl UnwindSafe for Arithmetic
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