pub struct RecvStream { /* private fields */ }Expand description
A receiving QUIC stream that reads ordered chunks of data.
Internally wraps an iroh::endpoint::RecvStream and manages
reusable futures for efficient reading.
Trait Implementations§
Source§impl RecvStream for RecvStream
impl RecvStream for RecvStream
Source§fn poll_data(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Option<Self::Buf>, StreamErrorIncoming>>
fn poll_data( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Option<Self::Buf>, StreamErrorIncoming>>
Polls for the next chunk of received data.
Returns:
Poll::Ready(Ok(Some(Bytes)))— when data is available.Poll::Ready(Ok(None))— when the stream has finished.Poll::Ready(Err(StreamErrorIncoming))— when an error occurs.
Source§fn stop_sending(&mut self, error_code: u64)
fn stop_sending(&mut self, error_code: u64)
Cancels further reception on this stream with the given error code.
Auto Trait Implementations§
impl Freeze for RecvStream
impl !RefUnwindSafe for RecvStream
impl Send for RecvStream
impl Sync for RecvStream
impl Unpin for RecvStream
impl UnsafeUnpin 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