pub struct P2pRecvStream { /* private fields */ }Expand description
A LinkRecvStream implementation wrapping a high-level receive stream.
Implementations§
Source§impl P2pRecvStream
impl P2pRecvStream
Sourcepub fn new(inner: HighLevelRecvStream) -> Self
pub fn new(inner: HighLevelRecvStream) -> Self
Create a new receive stream wrapper.
Trait Implementations§
Source§impl LinkRecvStream for P2pRecvStream
impl LinkRecvStream for P2pRecvStream
Source§fn read<'a>(
&'a mut self,
buf: &'a mut [u8],
) -> BoxFuture<'a, LinkResult<Option<usize>>>
fn read<'a>( &'a mut self, buf: &'a mut [u8], ) -> BoxFuture<'a, LinkResult<Option<usize>>>
Read data from the stream.
Source§fn read_to_end(
&mut self,
size_limit: usize,
) -> BoxFuture<'_, LinkResult<Vec<u8>>>
fn read_to_end( &mut self, size_limit: usize, ) -> BoxFuture<'_, LinkResult<Vec<u8>>>
Read all data until the stream ends.
Auto Trait Implementations§
impl Freeze for P2pRecvStream
impl RefUnwindSafe for P2pRecvStream
impl Send for P2pRecvStream
impl Sync for P2pRecvStream
impl Unpin for P2pRecvStream
impl UnwindSafe for P2pRecvStream
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