Struct Frame

pub struct Frame<T: Pixel> { pub planes: [Plane<T>; 3] }

Represents a raw video frame

Fields

planes: [Plane<T>; 3]

Planes constituting the frame.

Implementations

impl<T: Pixel> Frame<T>

fn new_with_padding(width: usize, height: usize, chroma_sampling: ChromaSampling, luma_padding: usize) -> Self

Creates a new frame with the given parameters.

Allocates data for the planes.

Trait Implementations

impl<T: Clone + Pixel> Clone for Frame<T>

fn clone(&self) -> Self

impl<T: Debug + Pixel> Debug for Frame<T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<T: Eq + Pixel> Eq for Frame<T>

impl<T: PartialEq + Pixel> PartialEq for Frame<T>

fn eq(&self, other: &Self) -> bool

impl<T: PartialEq + Pixel> StructuralPartialEq for Frame<T>

Auto Trait Implementations

impl<T> Freeze for Frame<T> where [Plane<T>; 3]: Freeze,

impl<T> RefUnwindSafe for Frame<T> where [Plane<T>; 3]: RefUnwindSafe,

impl<T> Send for Frame<T> where [Plane<T>; 3]: Send,

impl<T> Sync for Frame<T> where [Plane<T>; 3]: Sync,

impl<T> Unpin for Frame<T> where [Plane<T>; 3]: Unpin,

impl<T> UnsafeUnpin for Frame<T> where [Plane<T>; 3]: UnsafeUnpin,

impl<T> UnwindSafe for Frame<T> where [Plane<T>; 3]: UnwindSafe,

Blanket Implementations

impl<T> Any for Frame<T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Frame<T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Frame<T> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Frame<T> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Frame<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Frame<T> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Frame<T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Frame<T> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Frame<T> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>