pub struct ReceiveMultiStream<T> { /* private fields */ }
Implementations§
Source§impl<T: Owned> ReceiveMultiStream<T>
impl<T: Owned> ReceiveMultiStream<T>
pub fn id(&self) -> MultiStreamId
pub async fn next(&mut self) -> Result<Option<T>, ReceiveMultiStreamNextError>
pub async fn next_lazy( &mut self, ) -> Result<LazyBuf<Option<T>, Packet>, ReceiveMultiStreamNextError>
pub fn with_try_next<R>( &mut self, f: impl FnOnce(Option<DecodeResult<Option<T::Lazy<'_>>>>) -> R, ) -> R
pub async fn with_next<'a, Fut, R>(
&mut self,
f: impl FnOnce(DecodeResult<Option<T::Lazy<'_>>>) -> Fut,
) -> Option<R>where
Fut: Future<Output = R>,
pub async fn with_next_sync<'a, R>( &mut self, f: impl FnOnce(DecodeResult<T::Lazy<'_>>) -> R, ) -> Option<R>
pub async fn collect(&mut self) -> Result<Vec<T>, ReceiveMultiStreamNextError>
Source§impl<T: Owned, E: Owned + Debug> ReceiveMultiStream<Result<T, E>>
impl<T: Owned, E: Owned + Debug> ReceiveMultiStream<Result<T, E>>
pub async fn try_collect( &mut self, ) -> Result<Vec<T>, MultiStreamTryCollectError<E>>
Auto Trait Implementations§
impl<T> Freeze for ReceiveMultiStream<T>
impl<T> !RefUnwindSafe for ReceiveMultiStream<T>
impl<T> !Send for ReceiveMultiStream<T>
impl<T> !Sync for ReceiveMultiStream<T>
impl<T> Unpin for ReceiveMultiStream<T>where
T: Unpin,
impl<T> !UnwindSafe for ReceiveMultiStream<T>
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