pub struct RecvStream { /* private fields */ }Expand description
The receiving half of a stream.
moq-net reads it through poll::Buffered, since iroh returns flow
control credit as it reads. Dropping it stops the stream with code 0, as
iroh does.
It keeps the default poll_reset, which never
completes. iroh’s received_reset leaves its waker registered with the
stream, which a later read to the end then trips over in iroh’s drop check.
Trait Implementations§
Source§impl Chunks for RecvStream
impl Chunks for RecvStream
Source§type Error = TransportError
type Error = TransportError
The error type for every operation on this stream.
Source§fn poll_read_chunk(
&mut self,
waiter: &Waiter,
max: usize,
) -> Poll<Result<Option<Bytes>, TransportError>>
fn poll_read_chunk( &mut self, waiter: &Waiter, max: usize, ) -> Poll<Result<Option<Bytes>, TransportError>>
Poll for the next chunk, up to
max bytes, or None once the peer finished the
stream.Source§fn poll_reset(&mut self, waiter: &Waiter) -> Poll<Self::Error>
fn poll_reset(&mut self, waiter: &Waiter) -> Poll<Self::Error>
Poll until the stream fails without reading it. See
RecvStream::poll_reset.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