Struct machine_vision_formats::ImageBuffer
source · pub struct ImageBuffer<F> {
pub pixel_format: PhantomData<F>,
pub data: Vec<u8>,
}
Expand description
A concrete type which containing image data with pixel format F
.
This is a zero-size wrapper around bytes parameterized by the type F
. It
should cause no additional overhead above passing the raw byte vector but
maintains a compile-time guarantee of the image format.
Fields§
§pixel_format: PhantomData<F>
The pixel format
data: Vec<u8>
The raw bytes of the image buffer.
Implementations§
Trait Implementations§
source§impl<F: Clone> Clone for ImageBuffer<F>
impl<F: Clone> Clone for ImageBuffer<F>
source§fn clone(&self) -> ImageBuffer<F>
fn clone(&self) -> ImageBuffer<F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<F> Freeze for ImageBuffer<F>
impl<F> RefUnwindSafe for ImageBuffer<F>where
F: RefUnwindSafe,
impl<F> Send for ImageBuffer<F>where
F: Send,
impl<F> Sync for ImageBuffer<F>where
F: Sync,
impl<F> Unpin for ImageBuffer<F>where
F: Unpin,
impl<F> UnwindSafe for ImageBuffer<F>where
F: UnwindSafe,
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