pub enum TargetTime {
Monotonic(MonotonicInstant),
RealTime(UtcInstant),
BootInstant(BootInstant),
}Variants§
Implementations§
Source§impl TargetTime
impl TargetTime
pub fn is_zero(&self) -> bool
pub fn itimerspec(&self, interval: MonotonicDuration) -> itimerspec
pub fn estimate_boot(&self) -> Option<BootInstant>
Sourcepub fn into_resolved_utc_deadline(self) -> TargetTime
pub fn into_resolved_utc_deadline(self) -> TargetTime
Attempts to resolve a deadline based on UTC.
If the UTC clock is started, the UTC deadline is deemed accurate and retained. If not, then we emulate the deadline by mapping the fake UTC timestamp to the boot timeline. Such alarm will not move with the UTC timeline changes.
Sourcepub fn delta(&self, rhs: &Self) -> Option<GenericDuration>
pub fn delta(&self, rhs: &Self) -> Option<GenericDuration>
Find the difference between this time and rhs. Returns None if the timelines don’t
match.
Trait Implementations§
Source§impl Add<GenericDuration> for TargetTime
impl Add<GenericDuration> for TargetTime
Source§type Output = TargetTime
type Output = TargetTime
The resulting type after applying the
+ operator.Source§fn add(self, rhs: GenericDuration) -> Self
fn add(self, rhs: GenericDuration) -> Self
Performs the
+ operation. Read moreSource§impl Clone for TargetTime
impl Clone for TargetTime
Source§fn clone(&self) -> TargetTime
fn clone(&self) -> TargetTime
Returns a duplicate 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 TargetTime
impl Debug for TargetTime
Source§impl Display for TargetTime
impl Display for TargetTime
Source§impl From<Instant<BootTimeline>> for TargetTime
impl From<Instant<BootTimeline>> for TargetTime
Source§fn from(value: BootInstant) -> Self
fn from(value: BootInstant) -> Self
Converts to this type from the input type.
Source§impl From<Instant<UtcTimeline>> for TargetTime
impl From<Instant<UtcTimeline>> for TargetTime
Source§fn from(value: UtcInstant) -> Self
fn from(value: UtcInstant) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TargetTime
impl PartialEq for TargetTime
Source§impl PartialOrd for TargetTime
impl PartialOrd for TargetTime
Source§impl Sub<GenericDuration> for TargetTime
impl Sub<GenericDuration> for TargetTime
Source§type Output = TargetTime
type Output = TargetTime
The resulting type after applying the
- operator.impl Copy for TargetTime
impl StructuralPartialEq for TargetTime
Auto Trait Implementations§
impl Freeze for TargetTime
impl RefUnwindSafe for TargetTime
impl Send for TargetTime
impl Sync for TargetTime
impl Unpin for TargetTime
impl UnwindSafe for TargetTime
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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.