Skip to main content

AnimEncoder

Trait AnimEncoder 

Source
pub trait AnimEncoder {
    // Required method
    fn encode(&mut self) -> Result<Vec<u8>>;

    // Provided method
    fn save<P: AsRef<Path>>(&mut self, path: P) -> Result<()> { ... }
}
Expand description

Something that can consume rendered frames and emit an encoded animation.

Required Methods§

Source

fn encode(&mut self) -> Result<Vec<u8>>

Encode all frames into the target format, returning the bytes.

Provided Methods§

Source

fn save<P: AsRef<Path>>(&mut self, path: P) -> Result<()>

Encode all frames and write them to path.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§