pub struct DataStreamParser { /* private fields */ }Expand description
Stateful inline parser for a MoQT data stream.
Accepts raw byte chunks and emits parsed headers and object headers. The parser buffers partial data and tries to decode when enough bytes are available.
Implementations§
Source§impl DataStreamParser
impl DataStreamParser
Sourcepub fn new(stream_type: DataStreamType, draft: DraftVersion) -> Self
pub fn new(stream_type: DataStreamType, draft: DraftVersion) -> Self
Create a new parser for the given stream type and draft version.
Sourcepub fn feed(&mut self, data: &[u8]) -> Vec<DataParseResult>
pub fn feed(&mut self, data: &[u8]) -> Vec<DataParseResult>
Feed raw bytes into the parser.
Returns a list of parsed results. May return multiple results if the data contains several complete items.
Auto Trait Implementations§
impl Freeze for DataStreamParser
impl RefUnwindSafe for DataStreamParser
impl Send for DataStreamParser
impl Sync for DataStreamParser
impl Unpin for DataStreamParser
impl UnsafeUnpin for DataStreamParser
impl UnwindSafe for DataStreamParser
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