pub struct FrameRate { /* private fields */ }Expand description
Positive rational frame rate that preserves values such as 30_000/1_001.
Implementations§
Source§impl FrameRate
impl FrameRate
Sourcepub fn new(numerator: u32, denominator: u32) -> CameraResult<Self>
pub fn new(numerator: u32, denominator: u32) -> CameraResult<Self>
Creates and normalizes a positive rational frame rate.
Sourcepub const fn denominator(self) -> u32
pub const fn denominator(self) -> u32
Returns the normalized frames-per-second denominator.
Trait Implementations§
impl Copy for FrameRate
Source§impl<'de> Deserialize<'de> for FrameRate
Available on crate feature serde only.
impl<'de> Deserialize<'de> for FrameRate
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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