pub struct Frame<Id, Pixels> { /* private fields */ }Expand description
A validated decoded frame using caller-owned identity and pixel storage.
Implementations§
Source§impl<Id, Pixels: AsRef<[u8]>> Frame<Id, Pixels>
impl<Id, Pixels: AsRef<[u8]>> Frame<Id, Pixels>
pub fn new( id: Id, timestamp: Timestamp, dimensions: PixelDimensions, pixel_format: PixelFormat, pixels: Pixels, ) -> Result<Self>
pub fn id(&self) -> &Id
pub const fn timestamp(&self) -> Timestamp
pub const fn dimensions(&self) -> PixelDimensions
pub const fn pixel_format(&self) -> PixelFormat
pub fn pixels(&self) -> &[u8] ⓘ
pub fn as_borrowed(&self) -> BorrowedFrame<'_, &Id>
pub fn into_parts(self) -> (Id, Timestamp, PixelDimensions, PixelFormat, Pixels)
Trait Implementations§
Source§impl<'de, Id, Pixels> Deserialize<'de> for Frame<Id, Pixels>
impl<'de, Id, Pixels> Deserialize<'de> for Frame<Id, Pixels>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<Id: Eq, Pixels: Eq> Eq for Frame<Id, Pixels>
impl<Id: PartialEq, Pixels: PartialEq> StructuralPartialEq for Frame<Id, Pixels>
Auto Trait Implementations§
impl<Id, Pixels> Freeze for Frame<Id, Pixels>
impl<Id, Pixels> RefUnwindSafe for Frame<Id, Pixels>where
Id: RefUnwindSafe,
Pixels: RefUnwindSafe,
impl<Id, Pixels> Send for Frame<Id, Pixels>
impl<Id, Pixels> Sync for Frame<Id, Pixels>
impl<Id, Pixels> Unpin for Frame<Id, Pixels>
impl<Id, Pixels> UnsafeUnpin for Frame<Id, Pixels>where
Id: UnsafeUnpin,
Pixels: UnsafeUnpin,
impl<Id, Pixels> UnwindSafe for Frame<Id, Pixels>where
Id: UnwindSafe,
Pixels: 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