pub trait ImageFormat {
// Required method
fn is_filetype(data: &[u8]) -> bool;
}Required Methods§
Sourcefn is_filetype(data: &[u8]) -> bool
fn is_filetype(data: &[u8]) -> bool
Usually checks if data start with correct magic bytes
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.