pub struct Writer<'a> { /* private fields */ }Expand description
Where a Container writes a group’s frames: the group, or the track whose
next group the first frame creates, keyed by that frame’s timestamp.
Implementations§
Source§impl<'a> Writer<'a>
impl<'a> Writer<'a>
Sourcepub fn new(track: &'a Producer, group: &'a mut Option<Producer>) -> Self
pub fn new(track: &'a Producer, group: &'a mut Option<Producer>) -> Self
Write into group, appending one to track with the first frame while it is None.
Sourcepub fn write_frame<B: IntoBytes>(
&mut self,
timestamp: Timestamp,
data: B,
) -> Result<()>
pub fn write_frame<B: IntoBytes>( &mut self, timestamp: Timestamp, data: B, ) -> Result<()>
Write a frame, appending the group to the track with it when it is the first.
Sourcepub fn latest(&self) -> Option<Timestamp>
pub fn latest(&self) -> Option<Timestamp>
The newest timestamp the group holds, None before its first frame.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
How many frames the group holds.
Auto Trait Implementations§
impl<'a> !UnwindSafe for Writer<'a>
impl<'a> Freeze for Writer<'a>
impl<'a> RefUnwindSafe for Writer<'a>
impl<'a> Send for Writer<'a>
impl<'a> Sync for Writer<'a>
impl<'a> Unpin for Writer<'a>
impl<'a> UnsafeUnpin for Writer<'a>
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