pub struct Delta { /* private fields */ }Expand description
An unsigned magnitude in ticks. Not tied to a profile: a count of ticks means the same thing under any profile that shares the tick (§5).
Implementations§
Source§impl Delta
impl Delta
Sourcepub fn from_ticks(ticks: Ticks) -> Self
pub fn from_ticks(ticks: Ticks) -> Self
From a raw tick count.
Sourcepub fn from_tier(tier: Tier, count: u64) -> Result<Self>
pub fn from_tier(tier: Tier, count: u64) -> Result<Self>
Whole multiples of a tier: count x 5^e.
Sourcepub fn checked_add(&self, other: &Delta) -> Result<Delta>
pub fn checked_add(&self, other: &Delta) -> Result<Delta>
self + other, failing on domain exit (Rule O).
Sourcepub fn checked_sub(&self, other: &Delta) -> Result<Delta>
pub fn checked_sub(&self, other: &Delta) -> Result<Delta>
self - other, failing rather than wrapping (Rules Z, O).
Sourcepub fn divmod(&self, divisor: &Delta) -> Result<(Delta, Delta)>
pub fn divmod(&self, divisor: &Delta) -> Result<(Delta, Delta)>
Quotient and remainder against another magnitude.
Trait Implementations§
impl Copy for Delta
impl Eq for Delta
Source§impl Ord for Delta
impl Ord for Delta
1.21.0 (const: unstable) · 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 PartialOrd for Delta
impl PartialOrd for Delta
impl StructuralPartialEq for Delta
Auto Trait Implementations§
impl Freeze for Delta
impl RefUnwindSafe for Delta
impl Send for Delta
impl Sync for Delta
impl Unpin for Delta
impl UnsafeUnpin for Delta
impl UnwindSafe for Delta
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