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 const INFINITE: BootInstant = _
pub const INFINITE: BootInstant = _
The maximum time.
Sourcepub const INFINITE_PAST: BootInstant = _
pub const INFINITE_PAST: BootInstant = _
The minimum time.
Sourcepub fn now() -> Self
pub fn now() -> Self
Return the current time according to the system boot clock. Advances while the system is suspended.
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.
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.
Trait Implementations§
Source§impl Add<BootInstant> for BootDuration
impl Add<BootInstant> for BootDuration
Source§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
Source§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§impl PartialOrd for BootInstant
impl PartialOrd for BootInstant
Source§impl Sub<Duration<BootTimeline>> for BootInstant
impl Sub<Duration<BootTimeline>> for BootInstant
Source§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
Source§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§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
)