pub struct FrameRate { /* private fields */ }
Expand description
Frame-Rate definition
Implementations
sourceimpl FrameRate
impl FrameRate
sourcepub fn from_fps(fps: f64) -> Self
pub fn from_fps(fps: f64) -> Self
Frame rate defined by the FPS (Frame-Per-Second)
Panics
This function will panic if fps
is negative, zero or not finite.
sourcepub fn from_frame_duration(duration: Duration) -> Self
pub fn from_frame_duration(duration: Duration) -> Self
Frame rate defined by the duration of each frame
sourcepub fn from_total_duration(duration: Duration) -> Self
pub fn from_total_duration(duration: Duration) -> Self
Frame rate defined by the total duration of the animation
The actual FPS will then depend on the number of frame
Trait Implementations
impl Copy for FrameRate
impl Eq for FrameRate
impl StructuralEq for FrameRate
impl StructuralPartialEq for FrameRate
Auto Trait Implementations
impl RefUnwindSafe for FrameRate
impl Send for FrameRate
impl Sync for FrameRate
impl Unpin for FrameRate
impl UnwindSafe for FrameRate
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more