pub struct FrameRate { /* private fields */ }Expand description
A positive rational number of frames per second, stored in reduced form.
Implementations§
Source§impl FrameRate
impl FrameRate
Sourcepub const NTSC_DOUBLE: Self
pub const NTSC_DOUBLE: Self
Double NTSC rate of exactly 60000/1001 frames per second.
Sourcepub const fn denominator(self) -> u32
pub const fn denominator(self) -> u32
Returns the denominator of the reduced rate.
Sourcepub fn frame_duration(self) -> Duration
pub fn frame_duration(self) -> Duration
Returns the first frame’s duration, rounded up if not tick-exact.
Use Time::from_frame for later boundaries to avoid accumulated rounding.
Trait Implementations§
impl Copy for FrameRate
impl Eq for FrameRate
impl StructuralPartialEq for FrameRate
Auto Trait Implementations§
impl Forget for FrameRate
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