Struct canadensis::core::time::MicrosecondDuration48
source · [−]pub struct MicrosecondDuration48(_);
Expand description
A duration represented as a 48-bit number of microseconds
This type can represent durations of up to about 9 years.
It takes up 8 bytes of space (the same as a 64-bit duration).
Implementations
sourceimpl MicrosecondDuration48
impl MicrosecondDuration48
sourcepub fn new(microseconds: U48) -> MicrosecondDuration48
pub fn new(microseconds: U48) -> MicrosecondDuration48
Creates a duration from a number of microseconds
sourcepub fn as_microseconds(&self) -> U48
pub fn as_microseconds(&self) -> U48
Returns the number of microseconds this duration represents
Trait Implementations
sourceimpl Add<MicrosecondDuration48> for MicrosecondDuration48
impl Add<MicrosecondDuration48> for MicrosecondDuration48
type Output = MicrosecondDuration48
type Output = MicrosecondDuration48
The resulting type after applying the +
operator.
sourcefn add(
self,
rhs: MicrosecondDuration48
) -> <MicrosecondDuration48 as Add<MicrosecondDuration48>>::Output
fn add(
self,
rhs: MicrosecondDuration48
) -> <MicrosecondDuration48 as Add<MicrosecondDuration48>>::Output
Performs the +
operation. Read more
sourceimpl Add<Microseconds48> for MicrosecondDuration48
impl Add<Microseconds48> for MicrosecondDuration48
type Output = Microseconds48
type Output = Microseconds48
The resulting type after applying the +
operator.
sourcefn add(
self,
rhs: Microseconds48
) -> <MicrosecondDuration48 as Add<Microseconds48>>::Output
fn add(
self,
rhs: Microseconds48
) -> <MicrosecondDuration48 as Add<Microseconds48>>::Output
Performs the +
operation. Read more
sourceimpl Clone for MicrosecondDuration48
impl Clone for MicrosecondDuration48
sourcefn clone(&self) -> MicrosecondDuration48
fn clone(&self) -> MicrosecondDuration48
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MicrosecondDuration48
impl Debug for MicrosecondDuration48
sourceimpl Default for MicrosecondDuration48
impl Default for MicrosecondDuration48
sourcefn default() -> MicrosecondDuration48
fn default() -> MicrosecondDuration48
Returns the “default value” for a type. Read more
sourceimpl Duration for MicrosecondDuration48
impl Duration for MicrosecondDuration48
sourcefn from_millis(millis: u32) -> Option<MicrosecondDuration48>
fn from_millis(millis: u32) -> Option<MicrosecondDuration48>
Creates a duration from a number of milliseconds Read more
sourcefn subsec_nanos(&self) -> u32
fn subsec_nanos(&self) -> u32
Returns the fractional part of this duration in nanoseconds
sourceimpl Ord for MicrosecondDuration48
impl Ord for MicrosecondDuration48
sourceimpl PartialEq<MicrosecondDuration48> for MicrosecondDuration48
impl PartialEq<MicrosecondDuration48> for MicrosecondDuration48
sourcefn eq(&self, other: &MicrosecondDuration48) -> bool
fn eq(&self, other: &MicrosecondDuration48) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MicrosecondDuration48) -> bool
fn ne(&self, other: &MicrosecondDuration48) -> bool
This method tests for !=
.
sourceimpl PartialOrd<MicrosecondDuration48> for MicrosecondDuration48
impl PartialOrd<MicrosecondDuration48> for MicrosecondDuration48
sourcefn partial_cmp(&self, other: &MicrosecondDuration48) -> Option<Ordering>
fn partial_cmp(&self, other: &MicrosecondDuration48) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for MicrosecondDuration48
impl Eq for MicrosecondDuration48
impl StructuralEq for MicrosecondDuration48
impl StructuralPartialEq for MicrosecondDuration48
Auto Trait Implementations
impl RefUnwindSafe for MicrosecondDuration48
impl Send for MicrosecondDuration48
impl Sync for MicrosecondDuration48
impl Unpin for MicrosecondDuration48
impl UnwindSafe for MicrosecondDuration48
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more