pub struct StdArithmetic;Expand description
Arithmetic on a number type that implements all necessary operations natively.
As an example, this type implements Arithmetic for f32, f64, and the floating-point
complex numbers from the num-complex crate.
Trait Implementations§
Source§impl<T> Arithmetic<T> for StdArithmetic
impl<T> Arithmetic<T> for StdArithmetic
Source§impl Clone for StdArithmetic
impl Clone for StdArithmetic
impl Copy for StdArithmetic
Source§impl Debug for StdArithmetic
impl Debug for StdArithmetic
Source§impl Default for StdArithmetic
impl Default for StdArithmetic
Source§impl<T> OrdArithmetic<T> for StdArithmeticwhere
Self: Arithmetic<T>,
T: PartialOrd,
impl<T> OrdArithmetic<T> for StdArithmeticwhere
Self: Arithmetic<T>,
T: PartialOrd,
Auto Trait Implementations§
impl Freeze for StdArithmetic
impl RefUnwindSafe for StdArithmetic
impl Send for StdArithmetic
impl Sync for StdArithmetic
impl Unpin for StdArithmetic
impl UnsafeUnpin for StdArithmetic
impl UnwindSafe for StdArithmetic
Blanket Implementations§
Source§impl<T, A> ArithmeticExt<T> for Awhere
A: Arithmetic<T>,
impl<T, A> ArithmeticExt<T> for Awhere
A: Arithmetic<T>,
Source§fn without_comparisons(self) -> FullArithmetic<T, Self>
fn without_comparisons(self) -> FullArithmetic<T, Self>
Combines this arithmetic with a comparison function that assumes any two values are
incomparable.
Source§fn with_natural_comparison(self) -> FullArithmetic<T, Self>where
T: PartialOrd,
fn with_natural_comparison(self) -> FullArithmetic<T, Self>where
T: PartialOrd,
Combines this arithmetic with a comparison function specified by the
PartialOrd
implementation for T.Source§fn with_comparison(
self,
comparison: fn(&T, &T) -> Option<Ordering>,
) -> FullArithmetic<T, Self>
fn with_comparison( self, comparison: fn(&T, &T) -> Option<Ordering>, ) -> FullArithmetic<T, Self>
Combines this arithmetic with the specified comparison function.
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