Struct basic_frame::BasicFrame
source · pub struct BasicFrame<F> {
pub width: u32,
pub height: u32,
pub stride: u32,
pub image_data: Vec<u8>,
pub pixel_format: PhantomData<F>,
pub extra: Box<dyn HostTimeData>,
}Expand description
Image data with a statically typed, strided pixel format.
Fields§
§width: u32width in pixels
height: u32height in pixels
stride: u32number of bytes in an image row
image_data: Vec<u8>raw image data
pixel_format: PhantomData<F>pixel format
extra: Box<dyn HostTimeData>Additional data, including timestamp information.
Implementations§
source§impl<F> BasicFrame<F>
impl<F> BasicFrame<F>
pub fn copy_from(frame: &dyn ImageStrideTime<F>) -> BasicFrame<F>
Trait Implementations§
source§impl<F: Clone> Clone for BasicFrame<F>
impl<F: Clone> Clone for BasicFrame<F>
source§fn clone(&self) -> BasicFrame<F>
fn clone(&self) -> BasicFrame<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 moresource§impl<F> ExtraTimeData for BasicFrame<F>
impl<F> ExtraTimeData for BasicFrame<F>
fn extra(&self) -> &dyn HostTimeData
source§impl<F> ImageData<F> for BasicFrame<F>
impl<F> ImageData<F> for BasicFrame<F>
source§fn buffer_ref(&self) -> ImageBufferRef<'_, F>
fn buffer_ref(&self) -> ImageBufferRef<'_, F>
Returns the image buffer specified by pixel format
F. Read moresource§fn buffer(self) -> ImageBuffer<F>
fn buffer(self) -> ImageBuffer<F>
Returns the image buffer specified by pixel format
F. Read moresource§impl<F> ImageMutData<F> for BasicFrame<F>
impl<F> ImageMutData<F> for BasicFrame<F>
source§fn buffer_mut_ref(&mut self) -> ImageBufferMutRef<'_, F>
fn buffer_mut_ref(&mut self) -> ImageBufferMutRef<'_, F>
Returns the image mutable buffer specified by pixel format
F. Read moresource§impl<F> PartialEq for BasicFrame<F>where
F: PixelFormat,
impl<F> PartialEq for BasicFrame<F>where
F: PixelFormat,
source§fn eq(&self, other: &BasicFrame<F>) -> bool
fn eq(&self, other: &BasicFrame<F>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.Auto Trait Implementations§
impl<F> Freeze for BasicFrame<F>
impl<F> !RefUnwindSafe for BasicFrame<F>
impl<F> Send for BasicFrame<F>where
F: Send,
impl<F> !Sync for BasicFrame<F>
impl<F> Unpin for BasicFrame<F>where
F: Unpin,
impl<F> !UnwindSafe for BasicFrame<F>
Blanket Implementations§
source§impl<S, F> AsImageData<F> for Swhere
S: ImageData<F>,
impl<S, F> AsImageData<F> for Swhere
S: ImageData<F>,
fn as_image_data(&self) -> &dyn ImageData<F>
source§impl<S, F> AsImageStride<F> for Swhere
S: ImageStride<F>,
impl<S, F> AsImageStride<F> for Swhere
S: ImageStride<F>,
fn as_image_stride(&self) -> &dyn ImageStride<F>
source§impl<S, F> AsImageStrideTime<F> for Swhere
S: ImageStrideTime<F>,
impl<S, F> AsImageStrideTime<F> for Swhere
S: ImageStrideTime<F>,
fn as_image_stride_time(&self) -> &dyn ImageStrideTime<F>
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
source§impl<S, F> ImageStride<F> for S
impl<S, F> ImageStride<F> for S
fn rowchunks_exact(&self) -> RowChunksExact<'_>
source§impl<S, F> ImageStrideMut<F> for S
impl<S, F> ImageStrideMut<F> for S
fn rowchunks_exact_mut(&mut self) -> RowChunksExactMut<'_>
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