pub trait FrameSource {
// Required methods
fn fps(&self) -> u32;
fn size(&self) -> (u32, u32);
fn total_frames(&self) -> u32;
fn render(&mut self, frame: u32, size: (u32, u32)) -> Image;
}Expand description
A timeline that can draw any of its frames: “give me frame n”.
Frames are addressed by index (time n / fps) so that every caller
gets exactly the same pixels for the same frame, in any order.
Required Methods§
Sourcefn total_frames(&self) -> u32
fn total_frames(&self) -> u32
Length in frames.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".