pub struct FrameRate { /* private fields */ }Expand description
An exact positive video frame rate, in frames per second.
Implementations§
Source§impl FrameRate
impl FrameRate
Sourcepub fn new(numerator: u32, denominator: u32) -> Result<Self, FrameRateError>
pub fn new(numerator: u32, denominator: u32) -> Result<Self, FrameRateError>
Construct an exact rate from a numerator and denominator.
Sourcepub fn from_f64(value: f64) -> Result<Self, FrameRateError>
pub fn from_f64(value: f64) -> Result<Self, FrameRateError>
Approximate a finite catalog rate using 32-bit rational components.
Sourcepub fn denominator(self) -> u32
pub fn denominator(self) -> u32
The frames-per-second denominator.
Trait Implementations§
impl Copy for FrameRate
impl Eq for FrameRate
Source§impl Ord for FrameRate
impl Ord for FrameRate
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for FrameRate
impl PartialOrd for FrameRate
impl StructuralPartialEq for FrameRate
Auto Trait Implementations§
impl Freeze for FrameRate
impl RefUnwindSafe for FrameRate
impl Send for FrameRate
impl Sync for FrameRate
impl Unpin for FrameRate
impl UnsafeUnpin for FrameRate
impl UnwindSafe for FrameRate
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.