pub struct PositiveNum<T: Num + Clone + Copy + PartialOrd>(/* private fields */);
Implementations§
Source§impl<T: Num + Copy + PartialOrd> PositiveNum<T>
impl<T: Num + Copy + PartialOrd> PositiveNum<T>
pub fn new(value: T) -> Result<Self, PositiveNumError>
Source§impl<T: Num + PartialOrd + Copy> PositiveNum<T>
impl<T: Num + PartialOrd + Copy> PositiveNum<T>
Trait Implementations§
Source§impl<T: Clone + Num + Clone + Copy + PartialOrd> Clone for PositiveNum<T>
impl<T: Clone + Num + Clone + Copy + PartialOrd> Clone for PositiveNum<T>
Source§fn clone(&self) -> PositiveNum<T>
fn clone(&self) -> PositiveNum<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug + Num + Clone + Copy + PartialOrd> Debug for PositiveNum<T>
impl<T: Debug + Num + Clone + Copy + PartialOrd> Debug for PositiveNum<T>
Source§impl<T> From<PositiveNum<T>> for NormalizedAngle
impl<T> From<PositiveNum<T>> for NormalizedAngle
Source§fn from(value: PositiveNum<T>) -> Self
fn from(value: PositiveNum<T>) -> Self
Converts to this type from the input type.
Source§impl<T: Ord + Num + Clone + Copy + PartialOrd> Ord for PositiveNum<T>
impl<T: Ord + Num + Clone + Copy + PartialOrd> Ord for PositiveNum<T>
Source§fn cmp(&self, other: &PositiveNum<T>) -> Ordering
fn cmp(&self, other: &PositiveNum<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq + Num + Clone + Copy + PartialOrd> PartialEq for PositiveNum<T>
impl<T: PartialEq + Num + Clone + Copy + PartialOrd> PartialEq for PositiveNum<T>
Source§impl<T: PartialOrd + Num + Clone + Copy + PartialOrd> PartialOrd for PositiveNum<T>
impl<T: PartialOrd + Num + Clone + Copy + PartialOrd> PartialOrd for PositiveNum<T>
impl<T: Copy + Num + Clone + Copy + PartialOrd> Copy for PositiveNum<T>
impl<T: Eq + Num + Clone + Copy + PartialOrd> Eq for PositiveNum<T>
impl<T: Num + Clone + Copy + PartialOrd> StructuralPartialEq for PositiveNum<T>
Auto Trait Implementations§
impl<T> Freeze for PositiveNum<T>where
T: Freeze,
impl<T> RefUnwindSafe for PositiveNum<T>where
T: RefUnwindSafe,
impl<T> Send for PositiveNum<T>where
T: Send,
impl<T> Sync for PositiveNum<T>where
T: Sync,
impl<T> Unpin for PositiveNum<T>where
T: Unpin,
impl<T> UnwindSafe for PositiveNum<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