Struct machine_vision_formats::ImageBuffer [−][src]
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
impl<F: Clone> Clone for ImageBuffer<F>
[src]
impl<F: Clone> Clone for ImageBuffer<F>
[src]fn clone(&self) -> ImageBuffer<F>
[src]
fn clone(&self) -> ImageBuffer<F>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<F> RefUnwindSafe for ImageBuffer<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for ImageBuffer<F> where
F: Send,
F: Send,
impl<F> Sync for ImageBuffer<F> where
F: Sync,
F: Sync,
impl<F> Unpin for ImageBuffer<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for ImageBuffer<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more