Skip to main content

ImageSource

Trait ImageSource 

Source
pub trait ImageSource {
    // Required methods
    fn geometry(&self) -> Geometry;
    fn grab<'b>(&mut self, out: &'b mut [u8]) -> Result<Frame<'b>>;
}
Expand description

Something that produces frames.

Required Methods§

Source

fn geometry(&self) -> Geometry

The geometry every frame from this source has right now.

Source

fn grab<'b>(&mut self, out: &'b mut [u8]) -> Result<Frame<'b>>

Capture one frame into out. The returned view borrows out; for a JPEG source only the coded bytes are meaningful and out may be larger than the frame.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§