Enum SecondResolution

Source
pub enum SecondResolution {}
Expand description

Second resolution adapter.

Trait Implementations§

Source§

impl Debug for SecondResolution

Source§

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

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

impl Resolution for SecondResolution

Source§

const MAX_DURATION: Duration

The maximum duration that can be represented as u32 at this resolution.
Source§

fn cycle_steps(duration: &Duration, upper_bound: bool) -> u32

Convert the given duration into timer cycle steps. The given duration is guaranteed to be smaller than Resolution::MAX_DURATION. Read more
Source§

fn steps_as_duration(steps: u64) -> Duration

Convert the given steps to a duration.
Source§

fn whole_steps(duration: &Duration) -> u64

Return total steps required for the given duration. The returned steps should not be rounded up.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.