Struct Delay
struct Delay { ... }
The delay of a frame relative to the previous one.
Implementations
impl Delay
fn from_numer_denom_ms(numerator: u32, denominator: u32) -> SelfCreate a delay from a ratio of milliseconds.
Examples
use Delay; let delay_10ms = from_numer_denom_ms;fn from_saturating_duration(duration: Duration) -> SelfConvert from a duration, clamped between 0 and an implemented defined maximum.
The maximum is at least
i32::MAXmilliseconds. It should be noted that the accuracy of the result may be relative and very large delays have a coarse resolution.Examples
use Duration; use Delay; let duration = from_millis; let delay = from_saturating_duration;fn numer_denom_ms(self: Self) -> (u32, u32)The numerator and denominator of the delay in milliseconds.
This is guaranteed to be an exact conversion if the
Delaywas previously created with thefrom_numer_denom_msconstructor.
impl Clone for Delay
fn clone(self: &Self) -> Delay
impl Copy for Delay
impl Debug for Delay
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Delay
impl Freeze for Delay
impl PartialEq for Delay
fn eq(self: &Self, other: &Delay) -> bool
impl PartialOrd for Delay
fn partial_cmp(self: &Self, other: &Delay) -> Option<Ordering>
impl RefUnwindSafe for Delay
impl Send for Delay
impl StructuralPartialEq for Delay
impl Sync for Delay
impl Unpin for Delay
impl UnsafeUnpin for Delay
impl UnwindSafe for Delay
impl<T> Any for Delay
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Delay
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Delay
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Delay
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Delay
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for Delay
unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> ToOwned for Delay
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Delay
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Delay
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Delay
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>