[−][src]Struct purrmitive::Delay
The delay of a frame relative to the previous one.
Implementations
impl Delay
[src]
pub fn from_numer_denom_ms(numerator: u32, denominator: u32) -> Delay
[src]
Create a delay from a ratio of milliseconds.
Examples
use image::Delay; let delay_10ms = Delay::from_numer_denom_ms(10, 1);
pub fn from_saturating_duration(duration: Duration) -> Delay
[src]
Convert from a duration, clamped between 0 and an implemented defined maximum.
The maximum is at least i32::MAX
milliseconds. It should be noted that the accuracy of
the result may be relative and very large delays have a coarse resolution.
Examples
use std::time::Duration; use image::Delay; let duration = Duration::from_millis(20); let delay = Delay::from_saturating_duration(duration);
pub fn numer_denom_ms(self) -> (u32, u32)
[src]
The numerator and denominator of the delay in milliseconds.
This is guaranteed to be an exact conversion if the Delay
was previously created with the
from_numer_denom_ms
constructor.
Trait Implementations
impl Clone for Delay
[src]
impl Copy for Delay
[src]
impl Debug for Delay
[src]
impl Eq for Delay
[src]
impl PartialEq<Delay> for Delay
[src]
impl PartialOrd<Delay> for Delay
[src]
pub fn partial_cmp(&self, other: &Delay) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Delay) -> bool
[src]
pub fn le(&self, other: &Delay) -> bool
[src]
pub fn gt(&self, other: &Delay) -> bool
[src]
pub fn ge(&self, other: &Delay) -> bool
[src]
impl StructuralEq for Delay
[src]
impl StructuralPartialEq for Delay
[src]
Auto Trait Implementations
impl RefUnwindSafe for Delay
[src]
impl Send for Delay
[src]
impl Sync for Delay
[src]
impl Unpin for Delay
[src]
impl UnwindSafe for Delay
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
[src]
pub fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,