pub struct FramedRecvStream { /* private fields */ }Expand description
A framed reader for a recv stream. Handles MoQT varint-length decoding.
Implementations§
Source§impl FramedRecvStream
impl FramedRecvStream
Sourcepub fn new(inner: RecvStream) -> Self
pub fn new(inner: RecvStream) -> Self
Create a new framed receive stream.
Sourcepub async fn read_control(
&mut self,
capture_raw: bool,
) -> Result<(AnyControlMessage, Option<Vec<u8>>), ConnectionError>
pub async fn read_control( &mut self, capture_raw: bool, ) -> Result<(AnyControlMessage, Option<Vec<u8>>), ConnectionError>
Read a control message from the stream.
When capture_raw is true, the returned tuple includes a clone of the
framed wire bytes (for observer emission). When false, the second
element is None and the payload clone is skipped.
Sourcepub async fn read_subgroup_header(
&mut self,
) -> Result<AnySubgroupHeader, ConnectionError>
pub async fn read_subgroup_header( &mut self, ) -> Result<AnySubgroupHeader, ConnectionError>
Read a subgroup stream header.
Sourcepub async fn read_fetch_header(
&mut self,
) -> Result<AnyFetchHeader, ConnectionError>
pub async fn read_fetch_header( &mut self, ) -> Result<AnyFetchHeader, ConnectionError>
Read a fetch response header.
Sourcepub async fn read_subgroup_object(
&mut self,
) -> Result<SubgroupObject, ConnectionError>
pub async fn read_subgroup_object( &mut self, ) -> Result<SubgroupObject, ConnectionError>
Read the next draft-12 subgroup object (header + payload). The codec
helper ObjectHeader::decode is called without extensions by default;
callers that care about extensions should drive decoding explicitly.
Sourcepub async fn read_fetch_object(
&mut self,
) -> Result<FetchObject, ConnectionError>
pub async fn read_fetch_object( &mut self, ) -> Result<FetchObject, ConnectionError>
Read the next draft-12 fetch object (header + payload).
Auto Trait Implementations§
impl Freeze for FramedRecvStream
impl RefUnwindSafe for FramedRecvStream
impl Send for FramedRecvStream
impl Sync for FramedRecvStream
impl Unpin for FramedRecvStream
impl UnsafeUnpin for FramedRecvStream
impl UnwindSafe for FramedRecvStream
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