Struct fuchsia_async::Duration
pub struct Duration(/* private fields */);
Implementations§
§impl Duration
impl Duration
pub const INFINITE: Duration = _
pub const INFINITE_PAST: Duration = _
pub const ZERO: Duration = _
pub fn sleep(self)
pub fn sleep(self)
Sleep for the given amount of time.
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
pub const fn into_nanos(self) -> i64
pub const fn into_nanos(self) -> i64
Returns the number of nanoseconds contained by this Duration
.
pub const fn into_micros(self) -> i64
pub const fn into_micros(self) -> i64
Returns the total number of whole microseconds contained by this Duration
.
pub const fn into_millis(self) -> i64
pub const fn into_millis(self) -> i64
Returns the total number of whole milliseconds contained by this Duration
.
pub const fn into_seconds(self) -> i64
pub const fn into_seconds(self) -> i64
Returns the total number of whole seconds contained by this Duration
.
pub fn into_seconds_f64(self) -> f64
pub fn into_seconds_f64(self) -> f64
Returns the duration as a floating-point value in seconds.
pub const fn into_minutes(self) -> i64
pub const fn into_minutes(self) -> i64
Returns the total number of whole minutes contained by this Duration
.
pub 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) -> Duration
pub const fn from_micros(micros: i64) -> Duration
pub const fn from_millis(millis: i64) -> Duration
pub const fn from_seconds(secs: i64) -> Duration
pub const fn from_minutes(min: i64) -> Duration
pub const fn from_hours(hours: i64) -> Duration
Trait Implementations§
source§impl AddAssign<Duration> for Time
impl AddAssign<Duration> for Time
source§fn add_assign(&mut self, d: Duration)
fn add_assign(&mut self, d: Duration)
Performs the
+=
operation. Read more§impl AddAssign for Duration
impl AddAssign for Duration
§fn add_assign(&mut self, dur: Duration)
fn add_assign(&mut self, dur: Duration)
Performs the
+=
operation. Read moresource§impl DurationExt for Duration
impl DurationExt for Duration
§impl Ord for Duration
impl Ord for Duration
§impl PartialOrd for Duration
impl PartialOrd for Duration
§fn partial_cmp(&self, other: &Duration) -> Option<Ordering>
fn partial_cmp(&self, other: &Duration) -> Option<Ordering>
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, d: Duration)
fn sub_assign(&mut self, d: Duration)
Performs the
-=
operation. Read more§impl SubAssign for Duration
impl SubAssign for Duration
§fn sub_assign(&mut self, dur: Duration)
fn sub_assign(&mut self, dur: Duration)
Performs the
-=
operation. Read moresource§impl WakeupTime for Duration
impl WakeupTime for Duration
impl Copy for Duration
impl Eq for Duration
impl StructuralEq 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