Struct Connection
pub struct Connection<T> { /* private fields */ }Available on crate feature 
websocket and non-WebAssembly only.Expand description
The websocket connection.
Implementations§
§impl<T> Connection<T>
 
impl<T> Connection<T>
pub fn send_data(
    &mut self,
    data: Vec<u8>,
) -> Send<'_, Connection<T>, OutgoingData> ⓘ
pub fn send_data( &mut self, data: Vec<u8>, ) -> Send<'_, Connection<T>, OutgoingData> ⓘ
Send binary application data to the remote.
pub fn send_ping(
    &mut self,
    data: Vec<u8>,
) -> Send<'_, Connection<T>, OutgoingData> ⓘ
pub fn send_ping( &mut self, data: Vec<u8>, ) -> Send<'_, Connection<T>, OutgoingData> ⓘ
Send a PING to the remote.
pub fn send_pong(
    &mut self,
    data: Vec<u8>,
) -> Send<'_, Connection<T>, OutgoingData> ⓘ
pub fn send_pong( &mut self, data: Vec<u8>, ) -> Send<'_, Connection<T>, OutgoingData> ⓘ
Send an unsolicited PONG to the remote.
Trait Implementations§
§impl<T> Debug for Connection<T>
 
impl<T> Debug for Connection<T>
§impl<T> Sink<OutgoingData> for Connection<T>
 
impl<T> Sink<OutgoingData> for Connection<T>
§fn poll_ready(
    self: Pin<&mut Connection<T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_ready( self: Pin<&mut Connection<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to prepare the 
Sink to receive a value. Read more§fn start_send(
    self: Pin<&mut Connection<T>>,
    item: OutgoingData,
) -> Result<(), Error>
 
fn start_send( self: Pin<&mut Connection<T>>, item: OutgoingData, ) -> Result<(), Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready which returned Poll::Ready(Ok(())). Read more§fn poll_flush(
    self: Pin<&mut Connection<T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_flush( self: Pin<&mut Connection<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Flush any remaining output from this sink. Read more
§fn poll_close(
    self: Pin<&mut Connection<T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_close( self: Pin<&mut Connection<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Flush any remaining output and close this sink, if necessary. Read more
§impl<T> Stream for Connection<T>
 
impl<T> Stream for Connection<T>
§fn poll_next(
    self: Pin<&mut Connection<T>>,
    cx: &mut Context<'_>,
) -> Poll<Option<<Connection<T> as Stream>::Item>>
 
fn poll_next( self: Pin<&mut Connection<T>>, cx: &mut Context<'_>, ) -> Poll<Option<<Connection<T> as Stream>::Item>>
Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
None if the stream is exhausted. Read moreAuto Trait Implementations§
impl<T> Freeze for Connection<T>
impl<T> !RefUnwindSafe for Connection<T>
impl<T> Send for Connection<T>where
    T: Send,
impl<T> !Sync for Connection<T>
impl<T> Unpin for Connection<T>where
    T: Unpin,
impl<T> !UnwindSafe for Connection<T>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
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
§impl<E, S, T> FirstAnswer<T, E> for S
 
impl<E, S, T> FirstAnswer<T, E> for S
§fn first_answer(self) -> FirstAnswerFuture<Self> ⓘ
 
fn first_answer(self) -> FirstAnswerFuture<Self> ⓘ
Convert a Stream of dns response into a Future yielding the first answer,
discarding others if any.
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
 
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
 
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
 
impl<T> Pointable for T
§impl<T, Item> SinkExt<Item> for Twhere
    T: Sink<Item> + ?Sized,
 
impl<T, Item> SinkExt<Item> for Twhere
    T: Sink<Item> + ?Sized,
§fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
 
fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
Composes a function in front of the sink. Read more
§fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F>
 
fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F>
Composes a function in front of the sink. Read more
§fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F>
 
fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F>
Transforms the error returned by the sink.
§fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
 
fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
Map this sink’s error to a different error type using the 
Into trait. Read more§fn buffer(self, capacity: usize) -> Buffer<Self, Item>where
    Self: Sized,
 
fn buffer(self, capacity: usize) -> Buffer<Self, Item>where
    Self: Sized,
Adds a fixed-size buffer to the current sink. Read more
§fn flush(&mut self) -> Flush<'_, Self, Item> ⓘwhere
    Self: Unpin,
 
fn flush(&mut self) -> Flush<'_, Self, Item> ⓘwhere
    Self: Unpin,
Flush the sink, processing all pending items. Read more
§fn send(&mut self, item: Item) -> Send<'_, Self, Item> ⓘwhere
    Self: Unpin,
 
fn send(&mut self, item: Item) -> Send<'_, Self, Item> ⓘwhere
    Self: Unpin,
A future that completes after the given item has been fully processed
into the sink, including flushing. Read more
§fn feed(&mut self, item: Item) -> Feed<'_, Self, Item> ⓘwhere
    Self: Unpin,
 
fn feed(&mut self, item: Item) -> Feed<'_, Self, Item> ⓘwhere
    Self: Unpin,
A future that completes after the given item has been received
by the sink. Read more
§fn send_all<'a, St>(&'a mut self, stream: &'a mut St) -> SendAll<'a, Self, St> ⓘ
 
fn send_all<'a, St>(&'a mut self, stream: &'a mut St) -> SendAll<'a, Self, St> ⓘ
A future that completes after the given stream has been fully processed
into the sink, including flushing. Read more
§fn left_sink<Si2>(self) -> Either<Self, Si2> ⓘwhere
    Si2: Sink<Item, Error = Self::Error>,
    Self: Sized,
 
fn left_sink<Si2>(self) -> Either<Self, Si2> ⓘwhere
    Si2: Sink<Item, Error = Self::Error>,
    Self: Sized,
§fn right_sink<Si1>(self) -> Either<Si1, Self> ⓘwhere
    Si1: Sink<Item, Error = Self::Error>,
    Self: Sized,
 
fn right_sink<Si1>(self) -> Either<Si1, Self> ⓘwhere
    Si1: Sink<Item, Error = Self::Error>,
    Self: Sized,
§fn poll_ready_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>where
    Self: Unpin,
 
fn poll_ready_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>where
    Self: Unpin,
A convenience method for calling [
Sink::poll_ready] on Unpin
sink types.§fn start_send_unpin(&mut self, item: Item) -> Result<(), Self::Error>where
    Self: Unpin,
 
fn start_send_unpin(&mut self, item: Item) -> Result<(), Self::Error>where
    Self: Unpin,
A convenience method for calling [
Sink::start_send] on Unpin
sink types.§impl<T> StreamExt for Twhere
    T: Stream + ?Sized,
 
impl<T> StreamExt for Twhere
    T: Stream + ?Sized,
§fn next(&mut self) -> Next<'_, Self> ⓘwhere
    Self: Unpin,
 
fn next(&mut self) -> Next<'_, Self> ⓘwhere
    Self: Unpin,
Creates a future that resolves to the next item in the stream. Read more
§fn into_future(self) -> StreamFuture<Self> ⓘ
 
fn into_future(self) -> StreamFuture<Self> ⓘ
§fn map<T, F>(self, f: F) -> Map<Self, F>
 
fn map<T, F>(self, f: F) -> Map<Self, F>
Maps this stream’s items to a different type, returning a new stream of
the resulting type. Read more
§fn enumerate(self) -> Enumerate<Self>where
    Self: Sized,
 
fn enumerate(self) -> Enumerate<Self>where
    Self: Sized,
Creates a stream which gives the current iteration count as well as
the next value. Read more
§fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
 
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
Filters the values produced by this stream according to the provided
asynchronous predicate. Read more
§fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
 
fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
Filters the values produced by this stream while simultaneously mapping
them to a different type according to the provided asynchronous closure. Read more
§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
 
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
Computes from this stream’s items new items of a different type using
an asynchronous closure. Read more
§fn collect<C>(self) -> Collect<Self, C> ⓘ
 
fn collect<C>(self) -> Collect<Self, C> ⓘ
Transforms a stream into a collection, returning a
future representing the result of that computation. Read more
§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
 
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
Converts a stream of pairs into a future, which
resolves to pair of containers. Read more
§fn concat(self) -> Concat<Self> ⓘ
 
fn concat(self) -> Concat<Self> ⓘ
Concatenate all items of a stream into a single extendable
destination, returning a future representing the end result. Read more
§fn count(self) -> Count<Self> ⓘwhere
    Self: Sized,
 
fn count(self) -> Count<Self> ⓘwhere
    Self: Sized,
Drives the stream to completion, counting the number of items. Read more
§fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> ⓘ
 
fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> ⓘ
Execute an accumulating asynchronous computation over a stream,
collecting all the values into one final result. Read more
§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
 
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
Execute predicate over asynchronous stream, and return 
true if any element in stream satisfied a predicate. Read more§fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘ
 
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘ
Execute predicate over asynchronous stream, and return 
true if all element in stream satisfied a predicate. Read more§fn flatten(self) -> Flatten<Self>where
    Self::Item: Stream,
    Self: Sized,
 
fn flatten(self) -> Flatten<Self>where
    Self::Item: Stream,
    Self: Sized,
Flattens a stream of streams into just one continuous stream. Read more
§fn flatten_unordered(
    self,
    limit: impl Into<Option<usize>>,
) -> FlattenUnorderedWithFlowController<Self, ()>
 
fn flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> FlattenUnorderedWithFlowController<Self, ()>
Flattens a stream of streams into just one continuous stream. Polls
inner streams produced by the base stream concurrently. Read more
§fn flat_map_unordered<U, F>(
    self,
    limit: impl Into<Option<usize>>,
    f: F,
) -> FlatMapUnordered<Self, U, F>
 
fn flat_map_unordered<U, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> FlatMapUnordered<Self, U, F>
Maps a stream like [
StreamExt::map] but flattens nested Streams
and polls them concurrently, yielding items in any order, as they made
available. Read more§fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
 
fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
Combinator similar to [
StreamExt::fold] that holds internal state
and produces a new stream. Read more§fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
 
fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
Skip elements on this stream while the provided asynchronous predicate
resolves to 
true. Read more§fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
 
fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
Take elements from this stream while the provided asynchronous predicate
resolves to 
true. Read more§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
 
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
Take elements from this stream until the provided future resolves. Read more
§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
 
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
Runs this stream to completion, executing the provided asynchronous
closure for each element on the stream. Read more
§fn for_each_concurrent<Fut, F>(
    self,
    limit: impl Into<Option<usize>>,
    f: F,
) -> ForEachConcurrent<Self, Fut, F> ⓘ
 
fn for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> ForEachConcurrent<Self, Fut, F> ⓘ
Runs this stream to completion, executing the provided asynchronous
closure for each element on the stream concurrently as elements become
available. Read more
§fn take(self, n: usize) -> Take<Self>where
    Self: Sized,
 
fn take(self, n: usize) -> Take<Self>where
    Self: Sized,
Creates a new stream of at most 
n items of the underlying stream. Read more§fn skip(self, n: usize) -> Skip<Self>where
    Self: Sized,
 
fn skip(self, n: usize) -> Skip<Self>where
    Self: Sized,
Creates a new stream which skips 
n items of the underlying stream. Read more§fn catch_unwind(self) -> CatchUnwind<Self>where
    Self: Sized + UnwindSafe,
 
fn catch_unwind(self) -> CatchUnwind<Self>where
    Self: Sized + UnwindSafe,
Catches unwinding panics while polling the stream. Read more
§fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
 
fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
Wrap the stream in a Box, pinning it. Read more
§fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>where
    Self: Sized + 'a,
 
fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>where
    Self: Sized + 'a,
Wrap the stream in a Box, pinning it. Read more
§fn buffered(self, n: usize) -> Buffered<Self>
 
fn buffered(self, n: usize) -> Buffered<Self>
An adaptor for creating a buffered list of pending futures. Read more
§fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
 
fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
An adaptor for creating a buffered list of pending futures (unordered). Read more
§fn zip<St>(self, other: St) -> Zip<Self, St>where
    St: Stream,
    Self: Sized,
 
fn zip<St>(self, other: St) -> Zip<Self, St>where
    St: Stream,
    Self: Sized,
An adapter for zipping two streams together. Read more
§fn chain<St>(self, other: St) -> Chain<Self, St>where
    St: Stream<Item = Self::Item>,
    Self: Sized,
 
fn chain<St>(self, other: St) -> Chain<Self, St>where
    St: Stream<Item = Self::Item>,
    Self: Sized,
Adapter for chaining two streams. Read more
§fn peekable(self) -> Peekable<Self>where
    Self: Sized,
 
fn peekable(self) -> Peekable<Self>where
    Self: Sized,
Creates a new stream which exposes a 
peek method. Read more§fn chunks(self, capacity: usize) -> Chunks<Self>where
    Self: Sized,
 
fn chunks(self, capacity: usize) -> Chunks<Self>where
    Self: Sized,
An adaptor for chunking up items of the stream inside a vector. Read more
§fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
    Self: Sized,
 
fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
    Self: Sized,
An adaptor for chunking up ready items of the stream inside a vector. Read more
§fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘwhere
    S: Sink<Self::Ok, Error = Self::Error>,
    Self: Sized + TryStream,
 
fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘwhere
    S: Sink<Self::Ok, Error = Self::Error>,
    Self: Sized + TryStream,
A future that completes after the given stream has been fully processed
into the sink and the sink has been flushed and closed. Read more
§fn inspect<F>(self, f: F) -> Inspect<Self, F>
 
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Do something with each item of this stream, afterwards passing it on. Read more
§fn left_stream<B>(self) -> Either<Self, B> ⓘwhere
    B: Stream<Item = Self::Item>,
    Self: Sized,
 
fn left_stream<B>(self) -> Either<Self, B> ⓘwhere
    B: Stream<Item = Self::Item>,
    Self: Sized,
§fn right_stream<B>(self) -> Either<B, Self> ⓘwhere
    B: Stream<Item = Self::Item>,
    Self: Sized,
 
fn right_stream<B>(self) -> Either<B, Self> ⓘwhere
    B: Stream<Item = Self::Item>,
    Self: Sized,
§impl<S, T, E> TryStream for S
 
impl<S, T, E> TryStream for S
§impl<S> TryStreamExt for Swhere
    S: TryStream + ?Sized,
 
impl<S> TryStreamExt for Swhere
    S: TryStream + ?Sized,
§fn err_into<E>(self) -> ErrInto<Self, E>
 
fn err_into<E>(self) -> ErrInto<Self, E>
Wraps the current stream in a new stream which converts the error type
into the one provided. Read more
§fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
 
fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
Wraps the current stream in a new stream which maps the success value
using the provided closure. Read more
§fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
 
fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
Wraps the current stream in a new stream which maps the error value
using the provided closure. Read more
§fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
 
fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
Chain on a computation for when a value is ready, passing the successful
results to the provided closure 
f. Read more§fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
 
fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
Chain on a computation for when an error happens, passing the
erroneous result to the provided closure 
f. Read more§fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
 
fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
Do something with the success value of this stream, afterwards passing
it on. Read more
§fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
 
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
Do something with the error value of this stream, afterwards passing it on. Read more
§fn into_stream(self) -> IntoStream<Self>where
    Self: Sized,
 
fn into_stream(self) -> IntoStream<Self>where
    Self: Sized,
§fn try_next(&mut self) -> TryNext<'_, Self> ⓘwhere
    Self: Unpin,
 
fn try_next(&mut self) -> TryNext<'_, Self> ⓘwhere
    Self: Unpin,
Creates a future that attempts to resolve the next item in the stream.
If an error is encountered before the next item, the error is returned
instead. Read more
§fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> ⓘ
 
fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> ⓘ
Attempts to run this stream to completion, executing the provided
asynchronous closure for each element on the stream. Read more
§fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>
 
fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>
Skip elements on this stream while the provided asynchronous predicate
resolves to 
true. Read more§fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>
 
fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>
Take elements on this stream while the provided asynchronous predicate
resolves to 
true. Read more§fn try_for_each_concurrent<Fut, F>(
    self,
    limit: impl Into<Option<usize>>,
    f: F,
) -> TryForEachConcurrent<Self, Fut, F> ⓘ
 
fn try_for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> TryForEachConcurrent<Self, Fut, F> ⓘ
Attempts to run this stream to completion, executing the provided asynchronous
closure for each element on the stream concurrently as elements become
available, exiting as soon as an error occurs. Read more
§fn try_collect<C>(self) -> TryCollect<Self, C> ⓘ
 
fn try_collect<C>(self) -> TryCollect<Self, C> ⓘ
Attempt to transform a stream into a collection,
returning a future representing the result of that computation. Read more
§fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
    Self: Sized,
 
fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
    Self: Sized,
An adaptor for chunking up successful items of the stream inside a vector. Read more
§fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where
    Self: Sized,
 
fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where
    Self: Sized,
An adaptor for chunking up successful, ready items of the stream inside a vector. Read more
§fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
 
fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
Attempt to filter the values produced by this stream according to the
provided asynchronous closure. Read more
§fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
 
fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
Attempt to filter the values produced by this stream while
simultaneously mapping them to a different type according to the
provided asynchronous closure. Read more
§fn try_flatten_unordered(
    self,
    limit: impl Into<Option<usize>>,
) -> TryFlattenUnordered<Self>
 
fn try_flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> TryFlattenUnordered<Self>
Flattens a stream of streams into just one continuous stream. Produced streams
will be polled concurrently and any errors will be passed through without looking at them.
If the underlying base stream returns an error, it will be immediately propagated. Read more
§fn try_flatten(self) -> TryFlatten<Self>
 
fn try_flatten(self) -> TryFlatten<Self>
Flattens a stream of streams into just one continuous stream. Read more
§fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F> ⓘ
 
fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F> ⓘ
Attempt to execute an accumulating asynchronous computation over a
stream, collecting all the values into one final result. Read more
§fn try_concat(self) -> TryConcat<Self> ⓘ
 
fn try_concat(self) -> TryConcat<Self> ⓘ
Attempt to concatenate all items of a stream into a single
extendable destination, returning a future representing the end result. Read more
§fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>where
    Self::Ok: TryFuture<Error = Self::Error>,
    Self: Sized,
 
fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>where
    Self::Ok: TryFuture<Error = Self::Error>,
    Self: Sized,
Attempt to execute several futures from a stream concurrently (unordered). Read more
§fn try_buffered(self, n: usize) -> TryBuffered<Self>where
    Self::Ok: TryFuture<Error = Self::Error>,
    Self: Sized,
 
fn try_buffered(self, n: usize) -> TryBuffered<Self>where
    Self::Ok: TryFuture<Error = Self::Error>,
    Self: Sized,
Attempt to execute several futures from a stream concurrently. Read more
§fn try_poll_next_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Ok, Self::Error>>>where
    Self: Unpin,
 
fn try_poll_next_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Ok, Self::Error>>>where
    Self: Unpin,
A convenience method for calling [
TryStream::try_poll_next] on Unpin
stream types.§fn into_async_read(self) -> IntoAsyncRead<Self>
 
fn into_async_read(self) -> IntoAsyncRead<Self>
Adapter that converts this stream into an 
AsyncBufRead. Read more§fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F> ⓘ
 
fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F> ⓘ
Attempt to execute a predicate over an asynchronous stream and evaluate if all items
satisfy the predicate. Exits early if an 
Err is encountered or if an Ok item is found
that does not satisfy the predicate. Read more