Struct fuchsia_async::BootInstant
source · pub struct BootInstant(/* private fields */);
Expand description
A time relative to the executor’s clock on the boot timeline.
Implementations§
source§impl BootInstant
impl BootInstant
sourcepub fn now() -> Self
pub fn now() -> Self
Return the current time according to the system boot clock. Advances while the system is suspended.
This function does not support fake time from a TestExecutor
.
sourcepub fn after(duration: BootDuration) -> Self
pub fn after(duration: BootDuration) -> Self
Compute a deadline for the time in the future that is the
given Duration
away. Similar to zx::BootInstant::after
,
saturates on overflow instead of wrapping around.
This function does not support fake time from a TestExecutor
.
sourcepub const fn from_zx(t: BootInstant) -> Self
pub const fn from_zx(t: BootInstant) -> Self
Convert from zx::BootInstant
.
sourcepub const fn into_zx(self) -> BootInstant
pub const fn into_zx(self) -> BootInstant
Convert into zx::BootInstant
.
sourcepub const fn from_nanos(nanos: i64) -> Self
pub const fn from_nanos(nanos: i64) -> Self
Convert from nanoseconds.
sourcepub const fn into_nanos(self) -> i64
pub const fn into_nanos(self) -> i64
Convert to nanoseconds.
sourcepub const INFINITE: BootInstant = _
pub const INFINITE: BootInstant = _
The maximum time.
sourcepub const INFINITE_PAST: BootInstant = _
pub const INFINITE_PAST: BootInstant = _
The minimum time.
Trait Implementations§
source§impl Add<BootInstant> for BootDuration
impl Add<BootInstant> for BootDuration
§type Output = BootInstant
type Output = BootInstant
The resulting type after applying the
+
operator.source§fn add(self, t: BootInstant) -> BootInstant
fn add(self, t: BootInstant) -> BootInstant
Performs the
+
operation. Read moresource§impl Add<Duration<BootTimeline>> for BootInstant
impl Add<Duration<BootTimeline>> for BootInstant
§type Output = BootInstant
type Output = BootInstant
The resulting type after applying the
+
operator.source§fn add(self, d: BootDuration) -> BootInstant
fn add(self, d: BootDuration) -> BootInstant
Performs the
+
operation. Read moresource§impl AddAssign<Duration<BootTimeline>> for BootInstant
impl AddAssign<Duration<BootTimeline>> for BootInstant
source§fn add_assign(&mut self, d: BootDuration)
fn add_assign(&mut self, d: BootDuration)
Performs the
+=
operation. Read moresource§impl Clone for BootInstant
impl Clone for BootInstant
source§fn clone(&self) -> BootInstant
fn clone(&self) -> BootInstant
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 BootInstant
impl Debug for BootInstant
source§impl From<BootInstant> for BootInstant
impl From<BootInstant> for BootInstant
source§fn from(t: BootInstant) -> BootInstant
fn from(t: BootInstant) -> BootInstant
Converts to this type from the input type.
source§impl From<Instant<BootTimeline>> for BootInstant
impl From<Instant<BootTimeline>> for BootInstant
source§fn from(t: BootInstant) -> BootInstant
fn from(t: BootInstant) -> BootInstant
Converts to this type from the input type.
source§impl Hash for BootInstant
impl Hash for BootInstant
source§impl Ord for BootInstant
impl Ord for BootInstant
source§fn cmp(&self, other: &BootInstant) -> Ordering
fn cmp(&self, other: &BootInstant) -> Ordering
1.21.0 · 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 PartialEq for BootInstant
impl PartialEq for BootInstant
source§fn eq(&self, other: &BootInstant) -> bool
fn eq(&self, other: &BootInstant) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for BootInstant
impl PartialOrd for BootInstant
source§fn partial_cmp(&self, other: &BootInstant) -> Option<Ordering>
fn partial_cmp(&self, other: &BootInstant) -> 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 Sub<Duration<BootTimeline>> for BootInstant
impl Sub<Duration<BootTimeline>> for BootInstant
§type Output = BootInstant
type Output = BootInstant
The resulting type after applying the
-
operator.source§fn sub(self, d: BootDuration) -> BootInstant
fn sub(self, d: BootDuration) -> BootInstant
Performs the
-
operation. Read moresource§impl Sub for BootInstant
impl Sub for BootInstant
§type Output = Duration<BootTimeline>
type Output = Duration<BootTimeline>
The resulting type after applying the
-
operator.source§fn sub(self, t: BootInstant) -> BootDuration
fn sub(self, t: BootInstant) -> BootDuration
Performs the
-
operation. Read moresource§impl SubAssign<Duration<BootTimeline>> for BootInstant
impl SubAssign<Duration<BootTimeline>> for BootInstant
source§fn sub_assign(&mut self, d: BootDuration)
fn sub_assign(&mut self, d: BootDuration)
Performs the
-=
operation. Read moresource§impl WakeupTime for BootInstant
impl WakeupTime for BootInstant
impl Copy for BootInstant
impl Eq for BootInstant
impl StructuralPartialEq for BootInstant
Auto Trait Implementations§
impl Freeze for BootInstant
impl RefUnwindSafe for BootInstant
impl Send for BootInstant
impl Sync for BootInstant
impl Unpin for BootInstant
impl UnwindSafe for BootInstant
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)