Trait skia_safe::codec::Decoder

source ·
pub trait Decoder {
    const ID: &'static str;

    // Required methods
    fn is_format(data: &[u8]) -> bool;
    fn decode_stream(stream: &mut impl Read) -> Result<Codec<'_>, Result>;
}

Required Associated Constants§

source

const ID: &'static str

Required Methods§

source

fn is_format(data: &[u8]) -> bool

source

fn decode_stream(stream: &mut impl Read) -> Result<Codec<'_>, Result>

Implementors§

source§

impl Decoder for BmpDecoder

source§

const ID: &'static str = "bmp"

source§

impl Decoder for GifDecoder

source§

const ID: &'static str = "gif"

source§

impl Decoder for IcoDecoder

source§

const ID: &'static str = "ico"

source§

impl Decoder for JpegDecoder

source§

const ID: &'static str = "jpeg"

source§

impl Decoder for PngDecoder

source§

const ID: &'static str = "png"

source§

impl Decoder for WbmpDecoder

source§

const ID: &'static str = "Wbmp"