pub struct GenericDuration(/* private fields */);Expand description
This type is a convenience to use when the Timeline isn’t clear in Starnix. It allows storing a generic nanosecond duration which can be used to operate on Instants or Durations from any Timeline.
Implementations§
Source§impl GenericDuration
impl GenericDuration
pub fn from_nanos(nanos: zx_time_t) -> Self
pub fn into_mono(self) -> MonotonicDuration
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 GenericDuration
impl Clone for GenericDuration
Source§fn clone(&self) -> GenericDuration
fn clone(&self) -> GenericDuration
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 GenericDuration
impl Debug for GenericDuration
Source§impl Default for GenericDuration
impl Default for GenericDuration
Source§fn default() -> GenericDuration
fn default() -> GenericDuration
Returns the “default value” for a type. Read more
Source§impl Deref for GenericDuration
impl Deref for GenericDuration
Source§impl From<Duration<BootTimeline>> for GenericDuration
impl From<Duration<BootTimeline>> for GenericDuration
Source§fn from(other: BootDuration) -> Self
fn from(other: BootDuration) -> Self
Converts to this type from the input type.
Source§impl From<Duration<MonotonicTimeline>> for GenericDuration
impl From<Duration<MonotonicTimeline>> for GenericDuration
Source§fn from(other: MonotonicDuration) -> Self
fn from(other: MonotonicDuration) -> Self
Converts to this type from the input type.
Source§impl From<Duration<SyntheticTimeline>> for GenericDuration
impl From<Duration<SyntheticTimeline>> for GenericDuration
Source§fn from(other: SyntheticDuration) -> Self
fn from(other: SyntheticDuration) -> Self
Converts to this type from the input type.
Source§impl From<Duration<UtcTimeline>> for GenericDuration
impl From<Duration<UtcTimeline>> for GenericDuration
Source§fn from(other: UtcDuration) -> Self
fn from(other: UtcDuration) -> Self
Converts to this type from the input type.
Source§impl Hash for GenericDuration
impl Hash for GenericDuration
Source§impl Ord for GenericDuration
impl Ord for GenericDuration
Source§fn cmp(&self, other: &GenericDuration) -> Ordering
fn cmp(&self, other: &GenericDuration) -> 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 GenericDuration
impl PartialEq for GenericDuration
Source§impl PartialOrd for GenericDuration
impl PartialOrd for GenericDuration
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 GenericDuration
impl Eq for GenericDuration
impl StructuralPartialEq for GenericDuration
Auto Trait Implementations§
impl Freeze for GenericDuration
impl RefUnwindSafe for GenericDuration
impl Send for GenericDuration
impl Sync for GenericDuration
impl Unpin for GenericDuration
impl UnwindSafe for GenericDuration
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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.