Negative

Struct Negative 

Source
pub struct Negative<N: Number>(/* private fields */);

Trait Implementations§

Source§

impl<N, Rhs: Number> Add<Negative<Rhs>> for Negative<N>
where N: Add<Rhs> + Number,

Source§

type Output = Negative<<N as Add<Rhs>>::Output>

Source§

impl<N: Number, Rhs: Number, O: Number> Add<Negative<Rhs>> for Successor<N>
where Successor<N>: Sub<Rhs, Output = O>,

Source§

impl<N, Rhs, O> Add<Rhs> for Negative<N>
where Rhs: IsPositive + Number, N: Sub<Rhs, Output = O> + Number, O: Neg + Number,

Source§

type Output = <O as Neg>::Output

Source§

impl<N, Rhs: Number> Mul<Rhs> for Negative<N>
where N: Mul<Rhs> + Number, <N as Mul<Rhs>>::Output: Neg,

Source§

type Output = <<N as Mul<Rhs>>::Output as Neg>::Output

Source§

impl<N: Number + Neg> Neg for Negative<N>

Source§

impl<N: Number, Rhs: Number, O: Number> Sub<Negative<Rhs>> for Negative<N>
where Negative<N>: Add<Rhs, Output = O>,

Source§

impl<N, Rhs: Number, O: Number> Sub<Negative<Rhs>> for Successor<N>
where N: Add<Rhs, Output = O> + Number,

Source§

impl<Rhs: Number> Sub<Negative<Successor<Rhs>>> for Zero

Source§

impl<N, Rhs: Number, O: Number + Neg> Sub<Successor<Rhs>> for Negative<N>
where N: Add<Successor<Rhs>, Output = O> + Number,

Source§

type Output = <O as Neg>::Output

Source§

impl<N: Number + ToNum<isize>> ToNum<isize> for Negative<N>

Source§

impl<N: Number> Number for Negative<N>

Auto Trait Implementations§

§

impl<N> Freeze for Negative<N>

§

impl<N> RefUnwindSafe for Negative<N>
where N: RefUnwindSafe,

§

impl<N> Send for Negative<N>
where N: Send,

§

impl<N> Sync for Negative<N>
where N: Sync,

§

impl<N> Unpin for Negative<N>
where N: Unpin,

§

impl<N> UnwindSafe for Negative<N>
where N: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<N> Sub<Zero> for N
where N: Number,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.