pub enum ArithmeticOp {
Add,
Sub,
Div,
Mul,
Exp,
Mod,
}Expand description
Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value.
More information:
Variants§
Add
The addition operator produces the sum of numeric operands or string concatenation.
Syntax: x + y
More information:
Sub
The subtraction operator subtracts the two operands, producing their difference.
Syntax: x - y
More information:
Div
The division operator produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor.
Syntax: x / y
More information:
Mul
The multiplication operator produces the product of the operands.
Syntax: x * y
More information:
Exp
The exponentiation operator returns the result of raising the first operand to the power of the second operand.
Syntax: x ** y
The exponentiation operator is right-associative. a ** b ** c is equal to a ** (b ** c).
More information:
Mod
The remainder operator returns the remainder left over when one operand is divided by a second operand.
Syntax: x % y
The remainder operator always takes the sign of the dividend.
More information:
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for ArithmeticOp
impl<'arbitrary> Arbitrary<'arbitrary> for ArithmeticOp
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for ArithmeticOp
impl Clone for ArithmeticOp
Source§fn clone(&self) -> ArithmeticOp
fn clone(&self) -> ArithmeticOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ArithmeticOp
Source§impl Debug for ArithmeticOp
impl Debug for ArithmeticOp
Source§impl<'de> Deserialize<'de> for ArithmeticOp
impl<'de> Deserialize<'de> for ArithmeticOp
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>,
Source§impl Display for ArithmeticOp
impl Display for ArithmeticOp
impl Eq for ArithmeticOp
Source§impl From<ArithmeticOp> for BinaryOp
impl From<ArithmeticOp> for BinaryOp
Source§fn from(op: ArithmeticOp) -> Self
fn from(op: ArithmeticOp) -> Self
Source§impl PartialEq for ArithmeticOp
impl PartialEq for ArithmeticOp
Source§impl Serialize for ArithmeticOp
impl Serialize for ArithmeticOp
impl StructuralPartialEq for ArithmeticOp
Auto Trait Implementations§
impl Freeze for ArithmeticOp
impl RefUnwindSafe for ArithmeticOp
impl Send for ArithmeticOp
impl Sync for ArithmeticOp
impl Unpin for ArithmeticOp
impl UnsafeUnpin for ArithmeticOp
impl UnwindSafe for ArithmeticOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.