pub struct PageWriter { /* private fields */ }Expand description
Implementations§
Source§impl PageWriter
impl PageWriter
Sourcepub const fn new(serial: u32) -> Self
pub const fn new(serial: u32) -> Self
Creates a writer for a logical bitstream with the given serial number.
Sourcepub fn push(
&mut self,
out: &mut Vec<u8>,
packet: &[u8],
granule_position: u64,
end_of_stream: bool,
)
pub fn push( &mut self, out: &mut Vec<u8>, packet: &[u8], granule_position: u64, end_of_stream: bool, )
Appends one packet, emitting full pages into out as needed.
granule_position is the codec-defined position as of the end of this
packet; it is recorded on the page where the packet completes
(RFC 7845 §4: the page granule belongs to the last packet completed on
it). When end_of_stream is set, the page the packet completes on is
flagged EOS and flushed immediately.
Trait Implementations§
Source§impl Clone for PageWriter
impl Clone for PageWriter
Source§fn clone(&self) -> PageWriter
fn clone(&self) -> PageWriter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PageWriter
impl RefUnwindSafe for PageWriter
impl Send for PageWriter
impl Sync for PageWriter
impl Unpin for PageWriter
impl UnsafeUnpin for PageWriter
impl UnwindSafe for PageWriter
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