pub struct Positive { /* private fields */ }
Expand description
Positive, a wrapper for a f64 value, ensuring it is always > 0
Implementations§
Trait Implementations§
Source§impl Add<NonNegative> for Positive
impl Add<NonNegative> for Positive
Source§impl Add<Positive> for NonNegative
impl Add<Positive> for NonNegative
Source§type Output = NonNegative
type Output = NonNegative
The resulting type after applying the
+
operator.Source§impl AddAssign<NonNegative> for Positive
impl AddAssign<NonNegative> for Positive
Source§fn add_assign(&mut self, other: NonNegative)
fn add_assign(&mut self, other: NonNegative)
Performs the
+=
operation. Read moreSource§impl AddAssign<Positive> for NonNegative
impl AddAssign<Positive> for NonNegative
Source§fn add_assign(&mut self, other: Positive)
fn add_assign(&mut self, other: Positive)
Performs the
+=
operation. Read moreSource§impl AddAssign for Positive
impl AddAssign for Positive
Source§fn add_assign(&mut self, other: Positive)
fn add_assign(&mut self, other: Positive)
Performs the
+=
operation. Read moreSource§impl Div<NonNegative> for Positive
impl Div<NonNegative> for Positive
Source§type Output = NonNegative
type Output = NonNegative
The resulting type after applying the
/
operator.Source§fn div(self, other: NonNegative) -> NonNegative
fn div(self, other: NonNegative) -> NonNegative
Performs the
/
operation. Read moreSource§impl Div<Positive> for NonNegative
impl Div<Positive> for NonNegative
Source§type Output = NonNegative
type Output = NonNegative
The resulting type after applying the
/
operator.Source§impl Div for Positive
impl Div for Positive
Source§type Output = NonNegative
type Output = NonNegative
The resulting type after applying the
/
operator.Source§impl DivAssign<Positive> for NonNegative
impl DivAssign<Positive> for NonNegative
Source§fn div_assign(&mut self, other: Positive)
fn div_assign(&mut self, other: Positive)
Performs the
/=
operation. Read moreSource§impl From<Positive> for NonNegative
impl From<Positive> for NonNegative
Source§impl Mul<NonNegative> for Positive
impl Mul<NonNegative> for Positive
Source§type Output = NonNegative
type Output = NonNegative
The resulting type after applying the
*
operator.Source§fn mul(self, other: NonNegative) -> NonNegative
fn mul(self, other: NonNegative) -> NonNegative
Performs the
*
operation. Read moreSource§impl Mul<Positive> for NonNegative
impl Mul<Positive> for NonNegative
Source§type Output = NonNegative
type Output = NonNegative
The resulting type after applying the
*
operator.Source§impl MulAssign<Positive> for NonNegative
impl MulAssign<Positive> for NonNegative
Source§fn mul_assign(&mut self, other: Positive)
fn mul_assign(&mut self, other: Positive)
Performs the
*=
operation. Read moreSource§impl MulAssign for Positive
impl MulAssign for Positive
Source§fn mul_assign(&mut self, other: Positive)
fn mul_assign(&mut self, other: Positive)
Performs the
*=
operation. Read moreSource§impl PartialOrd for Positive
impl PartialOrd for Positive
impl Copy for Positive
impl Eq for Positive
impl StructuralPartialEq for Positive
Auto Trait Implementations§
impl Freeze for Positive
impl RefUnwindSafe for Positive
impl Send for Positive
impl Sync for Positive
impl Unpin for Positive
impl UnwindSafe for Positive
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more