Struct fuchsia_zircon::Duration
source · pub struct Duration(/* private fields */);
Implementations§
source§impl Duration
impl Duration
pub const INFINITE: Duration = _
pub const INFINITE_PAST: Duration = _
pub const ZERO: Duration = _
pub fn nanos(self) -> i64
👎Deprecated: Users should instead use into_nanos
pub fn micros(self) -> i64
👎Deprecated: Users should instead use into_micros
pub fn millis(self) -> i64
👎Deprecated: Users should instead use into_millis
pub fn seconds(self) -> i64
👎Deprecated: Users should instead use into_seconds
pub fn minutes(self) -> i64
👎Deprecated: Users should instead use into_minutes
pub fn hours(self) -> i64
👎Deprecated: Users should instead use into_hours
sourcepub const fn into_nanos(self) -> i64
pub const fn into_nanos(self) -> i64
Returns the number of nanoseconds contained by this Duration
.
sourcepub const fn into_micros(self) -> i64
pub const fn into_micros(self) -> i64
Returns the total number of whole microseconds contained by this Duration
.
sourcepub const fn into_millis(self) -> i64
pub const fn into_millis(self) -> i64
Returns the total number of whole milliseconds contained by this Duration
.
sourcepub const fn into_seconds(self) -> i64
pub const fn into_seconds(self) -> i64
Returns the total number of whole seconds contained by this Duration
.
sourcepub fn into_seconds_f64(self) -> f64
pub fn into_seconds_f64(self) -> f64
Returns the duration as a floating-point value in seconds.
sourcepub const fn into_minutes(self) -> i64
pub const fn into_minutes(self) -> i64
Returns the total number of whole minutes contained by this Duration
.
sourcepub const fn into_hours(self) -> i64
pub const fn into_hours(self) -> i64
Returns the total number of whole hours contained by this Duration
.
pub const fn from_nanos(nanos: i64) -> Self
pub const fn from_micros(micros: i64) -> Self
pub const fn from_millis(millis: i64) -> Self
pub const fn from_seconds(secs: i64) -> Self
pub const fn from_minutes(min: i64) -> Self
pub const fn from_hours(hours: i64) -> Self
Trait Implementations§
source§impl AddAssign<Duration> for Time
impl AddAssign<Duration> for Time
source§fn add_assign(&mut self, dur: Duration)
fn add_assign(&mut self, dur: Duration)
Performs the
+=
operation. Read moresource§impl AddAssign for Duration
impl AddAssign for Duration
source§fn add_assign(&mut self, dur: Duration)
fn add_assign(&mut self, dur: Duration)
Performs the
+=
operation. Read moresource§impl Ord for Duration
impl Ord for Duration
source§impl PartialEq for Duration
impl PartialEq for Duration
source§impl PartialOrd for Duration
impl PartialOrd for Duration
1.0.0 · source§fn 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 moresource§impl SubAssign<Duration> for Time
impl SubAssign<Duration> for Time
source§fn sub_assign(&mut self, dur: Duration)
fn sub_assign(&mut self, dur: Duration)
Performs the
-=
operation. Read moresource§impl SubAssign for Duration
impl SubAssign for Duration
source§fn sub_assign(&mut self, dur: Duration)
fn sub_assign(&mut self, dur: Duration)
Performs the
-=
operation. Read moreimpl Copy for Duration
impl Eq for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
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