pub struct ImageBuffer { /* private fields */ }Expand description
A decoded, fully validated container image owned as a flat byte buffer.
The type deliberately does not implement Clone. Container images are
several megabytes large, and an accidental copy would leave a second image
in memory that no layer is responsible for wiping.
Trait Implementations§
Source§impl CoverSource for ImageBuffer
impl CoverSource for ImageBuffer
Source§fn dimensions(&self) -> (u32, u32)
fn dimensions(&self) -> (u32, u32)
Image dimensions as
(width, height), in pixels.Source§fn pixels_mut(&mut self) -> &mut [u8] ⓘ
fn pixels_mut(&mut self) -> &mut [u8] ⓘ
Mutable view of the raw sample bytes, used by the embedding layer.
Source§fn color_space(&self) -> ColorSpace
fn color_space(&self) -> ColorSpace
Pixel layout of the underlying samples.
Source§fn pixel_count(&self) -> usize
fn pixel_count(&self) -> usize
Total number of pixels in the image.
Source§impl Debug for ImageBuffer
impl Debug for ImageBuffer
Source§impl Zeroize for ImageBuffer
impl Zeroize for ImageBuffer
Auto Trait Implementations§
impl Freeze for ImageBuffer
impl RefUnwindSafe for ImageBuffer
impl Send for ImageBuffer
impl Sync for ImageBuffer
impl Unpin for ImageBuffer
impl UnsafeUnpin for ImageBuffer
impl UnwindSafe for ImageBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more