Skip to main content

FrameSource

Trait FrameSource 

Source
pub trait FrameSource {
    // Required method
    fn next_frame(&mut self, frame: &mut Frame) -> Result<bool>;
}
Expand description

Anything that refills a caller-owned frame, one image per call.

Required Methods§

Source

fn next_frame(&mut self, frame: &mut Frame) -> Result<bool>

Fill frame with the next image, resizing it to the source’s size if needed. Ok(false) at the end of the stream.

§Errors

Fails if the underlying stream cannot be read.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§