pub trait ImageContainer: KnownSize + Sized {
// Required methods
fn get_data(&self) -> &Vec<u8> ⓘ;
fn get_data_mut(&mut self) -> &mut Vec<u8> ⓘ;
fn into_data(self) -> Vec<u8> ⓘ;
// Provided method
fn as_knownsize(&self) -> &dyn KnownSize { ... }
}
Expand description
Something that can act as, or contains, an image.
Required Methods§
Sourcefn get_data_mut(&mut self) -> &mut Vec<u8> ⓘ
fn get_data_mut(&mut self) -> &mut Vec<u8> ⓘ
Retrieve the data in the image, mutably
Provided Methods§
Sourcefn as_knownsize(&self) -> &dyn KnownSize
fn as_knownsize(&self) -> &dyn KnownSize
Convert the object to a dynamic KnownSize object, as rust doesn’t support calling KnownSize -methods directly on this object
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.