pub trait ImageData<T>: Sync + Send + AsRef<[T]> + AsMut<[T]>where
T: Copy + Type,{
// Provided methods
fn flush(&self) -> Result<(), Error> { ... }
fn data(&self) -> &[T] ⓘ { ... }
fn data_mut(&mut self) -> &mut [T] ⓘ { ... }
fn as_ptr(&self) -> *const T { ... }
fn as_mut_ptr(&mut self) -> *mut T { ... }
fn buffer(&self) -> &[u8] ⓘ { ... }
fn buffer_mut(&mut self) -> &mut [u8] ⓘ { ... }
}
Expand description
ImageData is used to hold pixel data for images
Provided Methods§
sourcefn flush(&self) -> Result<(), Error>
fn flush(&self) -> Result<(), Error>
Flush image data to disk, this is a no-op except when using memory-mapped data
sourcefn as_mut_ptr(&mut self) -> *mut T
fn as_mut_ptr(&mut self) -> *mut T
Get mutable pointer
sourcefn buffer_mut(&mut self) -> &mut [u8] ⓘ
fn buffer_mut(&mut self) -> &mut [u8] ⓘ
Get mutable byte slice