pub trait Decoder {
// Required methods
fn decode(&self, texture: &Texture2D) -> Result<RgbaImage>;
fn can_decode(&self, format: TextureFormat) -> bool;
fn supported_formats(&self) -> Vec<TextureFormat>;
}Expand description
Common decoder trait
This trait defines the interface that all specialized decoders must implement.
Required Methods§
Sourcefn can_decode(&self, format: TextureFormat) -> bool
fn can_decode(&self, format: TextureFormat) -> bool
Check if this decoder can handle the given format
Sourcefn supported_formats(&self) -> Vec<TextureFormat>
fn supported_formats(&self) -> Vec<TextureFormat>
Get list of formats supported by this decoder