pub struct Positive<T> { /* private fields */ }Expand description
A numeric value guaranteed to be strictly positive (> 0).
Useful for operations that require nonzero values, such as
Field::reciprocal.
Implementations§
Trait Implementations§
impl<T> Copy for Positive<T>where
T: Copy,
Source§impl<T> PartialEq for Positive<T>where
T: PartialEq,
impl<T> PartialEq for Positive<T>where
T: PartialEq,
Source§impl<T> PartialOrd for Positive<T>where
T: PartialOrd,
impl<T> PartialOrd for Positive<T>where
T: PartialOrd,
impl<T> StructuralPartialEq for Positive<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Freeze for Positive<T>where
T: Freeze,
impl<T> RefUnwindSafe for Positive<T>where
T: RefUnwindSafe,
impl<T> Send for Positive<T>where
T: Send,
impl<T> Sync for Positive<T>where
T: Sync,
impl<T> Unpin for Positive<T>where
T: Unpin,
impl<T> UnsafeUnpin for Positive<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Positive<T>where
T: UnwindSafe,
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