Struct web_transport::RecvStream
source · pub struct RecvStream(/* private fields */);
Expand description
An incoming stream of bytes from the peer.
All bytes are flushed in order and the stream is flow controlled. The stream will be closed with STOP_SENDING code=0 when dropped.
Implementations§
source§impl RecvStream
impl RecvStream
sourcepub async fn read(&mut self, buf: &mut [u8]) -> Result<Option<usize>, ReadError>
pub async fn read(&mut self, buf: &mut [u8]) -> Result<Option<usize>, ReadError>
Read some data into the provided buffer.
sourcepub async fn read_buf<B: BufMut>(
&mut self,
buf: &mut B,
) -> Result<bool, ReadError>
pub async fn read_buf<B: BufMut>( &mut self, buf: &mut B, ) -> Result<bool, ReadError>
Read some data into the provided buffer.
Auto Trait Implementations§
impl Freeze for RecvStream
impl RefUnwindSafe for RecvStream
impl Send for RecvStream
impl Sync for RecvStream
impl Unpin for RecvStream
impl UnwindSafe for RecvStream
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