Skip to main content

Decoder

Trait Decoder 

Source
pub trait Decoder {
    // Required method
    fn decode(&self, data: &[u8], out: &mut Vec<u8>) -> Result<Dimensions>;
}
Expand description

Decodes a compressed byte stream into raw pixels.

Required Methods§

Source

fn decode(&self, data: &[u8], out: &mut Vec<u8>) -> Result<Dimensions>

Decode data into out, returning the decoded image Dimensions.

§Errors

Returns Error::InvalidInput if data is malformed, or Error::Unsupported if the stream uses a feature that is not implemented.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§