Trait ytesrev::image::ImageContainer [−][src]
pub trait ImageContainer: KnownSize + Sized { fn get_data(&self) -> &Vec<u8>; fn get_data_mut(&mut self) -> &mut Vec<u8>; fn into_data(self) -> Vec<u8>; fn as_knownsize(&self) -> &KnownSize { ... } }
Something that can act as, or contains, an image.
Required Methods
fn get_data(&self) -> &Vec<u8>
Retrieve the data in the image
fn get_data_mut(&mut self) -> &mut Vec<u8>
Retrieve the data in the image, mutably
fn into_data(self) -> Vec<u8>
Retrieve the data in the image, consuming the object
Provided Methods
fn as_knownsize(&self) -> &KnownSize
Convert the object to a dynamic KnownSize object, as rust doesn't support calling KnownSize -methods directly on this object
Implementors
impl<T: ImageContainer + KnownSize> ImageContainer for Ditherer<T>
impl ImageContainer for PngImage
impl ImageContainer for LatexObj