Type Alias BootDurationTicks

Source
pub type BootDurationTicks = Duration<BootTimeline, TicksUnit>;
Expand description

A duration between two system ticks boot timestamps.

Aliased Type§

struct BootDurationTicks(/* private fields */);

Implementations

Source§

impl<T: Timeline> Duration<T, TicksUnit>

Source

pub const fn into_raw(self) -> i64

Return the raw number of ticks represented by this Duration.

Source

pub const fn from_raw(raw: i64) -> Self

Return a typed wrapper around the provided number of ticks.

Trait Implementations

Source§

impl<T: Timeline, U: TimeUnit> Add<Instant<T, U>> for Duration<T, U>

Source§

type Output = Instant<T, U>

The resulting type after applying the + operator.
Source§

fn add(self, time: Instant<T, U>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Timeline, U: TimeUnit> Add for Duration<T, U>

Source§

type Output = Duration<T, U>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Duration<T, U>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Timeline, U: TimeUnit> AddAssign for Duration<T, U>

Source§

fn add_assign(&mut self, rhs: Duration<T, U>)

Performs the += operation. Read more
Source§

impl<T: Clone, U: Clone> Clone for Duration<T, U>

Source§

fn clone(&self) -> Duration<T, U>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, U: Debug> Debug for Duration<T, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Default, U: Default> Default for Duration<T, U>

Source§

fn default() -> Duration<T, U>

Returns the “default value” for a type. Read more
Source§

impl<S: Into<i64>, T: Timeline, U: TimeUnit> Div<S> for Duration<T, U>

Source§

type Output = Duration<T, U>

The resulting type after applying the / operator.
Source§

fn div(self, div: S) -> Self

Performs the / operation. Read more
Source§

impl<T, U> FromBytes for Duration<T, U>
where zx_duration_t: FromBytes, PhantomData<(T, U)>: FromBytes,

§

fn read_from_bytes(source: &[u8]) -> Result<Self, SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the given source. Read more
§

fn read_from_prefix( source: &[u8], ) -> Result<(Self, &[u8]), SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the prefix of the given source. Read more
§

fn read_from_suffix( source: &[u8], ) -> Result<(&[u8], Self), SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the suffix of the given source. Read more
Source§

impl<T, U> FromZeros for Duration<T, U>
where zx_duration_t: FromZeros, PhantomData<(T, U)>: FromZeros,

§

fn zero(&mut self)

Overwrites self with zeros. Read more
§

fn new_zeroed() -> Self
where Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
Source§

impl<T: Hash, U: Hash> Hash for Duration<T, U>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T, U> IntoBytes for Duration<T, U>
where zx_duration_t: IntoBytes, PhantomData<(T, U)>: IntoBytes,

§

fn as_bytes(&self) -> &[u8]
where Self: Immutable,

Gets the bytes of this value. Read more
§

fn as_mut_bytes(&mut self) -> &mut [u8]
where Self: FromBytes,

Gets the bytes of this value mutably. Read more
§

fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to dst. Read more
§

fn write_to_prefix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the prefix of dst. Read more
§

fn write_to_suffix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the suffix of dst. Read more
Source§

impl<T: Timeline, S: Into<i64>, U: TimeUnit> Mul<S> for Duration<T, U>

Source§

type Output = Duration<T, U>

The resulting type after applying the * operator.
Source§

fn mul(self, mul: S) -> Self

Performs the * operation. Read more
Source§

impl<T: Timeline, U: TimeUnit> Neg for Duration<T, U>

Source§

type Output = Duration<T, U>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: Ord, U: Ord> Ord for Duration<T, U>

Source§

fn cmp(&self, other: &Duration<T, U>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: PartialEq, U: PartialEq> PartialEq for Duration<T, U>

Source§

fn eq(&self, other: &Duration<T, U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialOrd, U: PartialOrd> PartialOrd for Duration<T, U>

Source§

fn partial_cmp(&self, other: &Duration<T, U>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T: Timeline, U: TimeUnit> Sub for Duration<T, U>

Source§

type Output = Duration<T, U>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Duration<T, U>) -> Duration<T, U>

Performs the - operation. Read more
Source§

impl<T: Timeline, U: TimeUnit> SubAssign for Duration<T, U>

Source§

fn sub_assign(&mut self, rhs: Duration<T, U>)

Performs the -= operation. Read more
Source§

impl<T, U> TryFromBytes for Duration<T, U>
where zx_duration_t: TryFromBytes, PhantomData<(T, U)>: TryFromBytes,

§

fn try_read_from_bytes( source: &[u8], ) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read the given source as a Self. Read more
§

fn try_read_from_prefix( source: &[u8], ) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read a Self from the prefix of the given source. Read more
§

fn try_read_from_suffix( source: &[u8], ) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read a Self from the suffix of the given source. Read more
Source§

impl<T: Copy, U: Copy> Copy for Duration<T, U>

Source§

impl<T: Eq, U: Eq> Eq for Duration<T, U>

Source§

impl<T, U> Immutable for Duration<T, U>
where zx_duration_t: Immutable, PhantomData<(T, U)>: Immutable,

Source§

impl<T, U> StructuralPartialEq for Duration<T, U>