Enum bonsaidb_core::key::time::limited::SignedDuration    
source · pub enum SignedDuration {
    Positive(Duration),
    Negative(Duration),
}Expand description
A Duration that can be either negative or positive.
Variants§
Positive(Duration)
A duration representing a positive measurement of time.
Negative(Duration)
A duration representing a negative measurement of time.
Implementations§
source§impl SignedDuration
 
impl SignedDuration
sourcepub fn checked_add(self, other: Self) -> Option<Self>
 
pub fn checked_add(self, other: Self) -> Option<Self>
Adds the two durations, honoring the signs, and returns the result if the duration is representable.
Trait Implementations§
source§impl Clone for SignedDuration
 
impl Clone for SignedDuration
source§fn clone(&self) -> SignedDuration
 
fn clone(&self) -> SignedDuration
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 Debug for SignedDuration
 
impl Debug for SignedDuration
source§impl PartialEq for SignedDuration
 
impl PartialEq for SignedDuration
source§fn eq(&self, other: &SignedDuration) -> bool
 
fn eq(&self, other: &SignedDuration) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl Sum<SignedDuration> for Option<SignedDuration>
 
impl Sum<SignedDuration> for Option<SignedDuration>
source§fn sum<I: Iterator<Item = SignedDuration>>(iter: I) -> Self
 
fn sum<I: Iterator<Item = SignedDuration>>(iter: I) -> Self
Method which takes an iterator and generates 
Self from the elements by
“summing up” the items.source§impl Sum for SignedDuration
 
impl Sum for SignedDuration
source§impl<Resolution> TryFrom<LimitedResolutionDuration<Resolution>> for SignedDurationwhere
    Resolution: TimeResolution,
 
impl<Resolution> TryFrom<LimitedResolutionDuration<Resolution>> for SignedDurationwhere
    Resolution: TimeResolution,
source§impl<Resolution> TryFrom<SignedDuration> for LimitedResolutionDuration<Resolution>where
    Resolution: TimeResolution,
 
impl<Resolution> TryFrom<SignedDuration> for LimitedResolutionDuration<Resolution>where
    Resolution: TimeResolution,
impl Copy for SignedDuration
impl Eq for SignedDuration
impl StructuralEq for SignedDuration
impl StructuralPartialEq for SignedDuration
Auto Trait Implementations§
impl RefUnwindSafe for SignedDuration
impl Send for SignedDuration
impl Sync for SignedDuration
impl Unpin for SignedDuration
impl UnwindSafe for SignedDuration
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