pub struct Frame { /* private fields */ }Expand description
Owned raw frame buffer paired with validated frame metadata.
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn new(info: FrameInfo, data: Vec<u8>) -> Result<Self>
pub fn new(info: FrameInfo, data: Vec<u8>) -> Result<Self>
Create an owned frame, validating that data has exactly the expected length.
Sourcepub fn blank(info: FrameInfo) -> Self
pub fn blank(info: FrameInfo) -> Self
Create an all-zero frame with the expected byte length for info.
Sourcepub fn as_frame_ref(&self) -> FrameRef<'_>
pub fn as_frame_ref(&self) -> FrameRef<'_>
Borrow this frame as a FrameRef.
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Forget for Frame
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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