Struct bonsaidb::client::fabruic::Connection
pub struct Connection<T>where
T: DeserializeOwned + Serialize + Send + 'static,{ /* private fields */ }
Expand description
Represents an open connection. Receives Incoming
through [Stream
].
Implementations§
§impl<T> Connection<T>where
T: DeserializeOwned + Serialize + Send + 'static,
impl<T> Connection<T>where T: DeserializeOwned + Serialize + Send + 'static,
pub async fn open_stream<S, R>(
&self,
type: &T
) -> impl Future<Output = Result<(Sender<S>, Receiver<R>), Stream>>where
S: DeserializeOwned + Serialize + Send + 'static,
R: DeserializeOwned + Serialize + Send + 'static,
pub async fn open_stream<S, R>( &self, type: &T ) -> impl Future<Output = Result<(Sender<S>, Receiver<R>), Stream>>where S: DeserializeOwned + Serialize + Send + 'static, R: DeserializeOwned + Serialize + Send + 'static,
Open a stream on this Connection
, allowing to send data back and
forth.
Use S
and R
to define which type this stream is sending and
receiving and type
to send this information to the receiver.
Errors
error::Stream::Open
if opening a stream failederror::Stream::Sender
if sending the type information to the peer failed, seeerror::Sender
for more details
pub fn protocol(&self) -> Option<Vec<u8, Global>>
pub fn protocol(&self) -> Option<Vec<u8, Global>>
The negotiated application protocol. See
Builder::set_protocols
.
pub fn peer_identity(&self) -> Option<CertificateChain>
pub fn peer_identity(&self) -> Option<CertificateChain>
Get the peer’s CertificateChain
, if available.
pub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
The peer’s address. Clients may change addresses at will, e.g. when switching to a cellular internet connection.
pub async fn close_incoming(
&self
) -> impl Future<Output = Result<(), AlreadyClosed>>
pub async fn close_incoming( &self ) -> impl Future<Output = Result<(), AlreadyClosed>>
Prevents any new incoming streams. Already incoming streams will finish first.
Errors
error::AlreadyClosed
if it was already closed.
pub async fn close(&self) -> impl Future<Output = Result<(), AlreadyClosed>>
pub async fn close(&self) -> impl Future<Output = Result<(), AlreadyClosed>>
Close the Connection
immediately.
To close a Connection
gracefully use Sender::finish
, the
Receiver
can’t be gracefully closed from the receiving end.
Errors
error::AlreadyClosed
if it was already closed.
Trait Implementations§
§impl<T> Clone for Connection<T>where
T: Clone + DeserializeOwned + Serialize + Send + 'static,
impl<T> Clone for Connection<T>where T: Clone + DeserializeOwned + Serialize + Send + 'static,
§fn clone(&self) -> Connection<T>
fn clone(&self) -> Connection<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl<T> Debug for Connection<T>where
T: DeserializeOwned + Serialize + Send + 'static,
impl<T> Debug for Connection<T>where T: DeserializeOwned + Serialize + Send + 'static,
§impl<T> FusedStream for Connection<T>where
T: DeserializeOwned + Serialize + Send + 'static,
impl<T> FusedStream for Connection<T>where T: DeserializeOwned + Serialize + Send + 'static,
§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true
if the stream should no longer be polled.§impl<T> Stream for Connection<T>where
T: DeserializeOwned + Serialize + Send + 'static,
impl<T> Stream for Connection<T>where T: DeserializeOwned + Serialize + Send + 'static,
§type Item = Result<Incoming<T>, Connection>
type Item = Result<Incoming<T>, Connection>
§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>>
None
if the stream is exhausted. Read moreimpl<'pin, T> Unpin for Connection<T>where T: DeserializeOwned + Serialize + Send + 'static, __Connection<'pin, T>: Unpin,
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Connection<T>
impl<T> Send for Connection<T>
impl<T> Sync for Connection<T>where T: Sync,
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> 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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§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,
§fn into_future(self) -> StreamFuture<Self>where
Self: Sized + Unpin,
fn into_future(self) -> StreamFuture<Self>where Self: Sized + Unpin,
§fn map<T, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
Self: Sized,
fn map<T, F>(self, f: F) -> Map<Self, F>where F: FnMut(Self::Item) -> T, Self: Sized,
§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where Self: Sized,
§fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
§fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = Option<T>>,
Self: Sized,
fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = Option<T>>, Self: Sized,
§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future,
Self: Sized,
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future, Self: Sized,
§fn collect<C>(self) -> Collect<Self, C>where
C: Default + Extend<Self::Item>,
Self: Sized,
fn collect<C>(self) -> Collect<Self, C>where C: Default + Extend<Self::Item>, Self: Sized,
§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>where
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Self: Sized + Stream<Item = (A, B)>,
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Stream<Item = (A, B)>,
§fn concat(self) -> Concat<Self>where
Self: Sized,
Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,
fn concat(self) -> Concat<Self>where Self: Sized, Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,
§fn count(self) -> Count<Self>where
Self: Sized,
fn count(self) -> Count<Self>where Self: Sized,
§fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>where
F: FnMut(T, Self::Item) -> Fut,
Fut: Future<Output = T>,
Self: Sized,
fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>where F: FnMut(T, Self::Item) -> Fut, Fut: Future<Output = T>, Self: Sized,
§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
true
if any element in stream satisfied a predicate. Read more§fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
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,
§fn flatten_unordered(
self,
limit: impl Into<Option<usize>>
) -> FlattenUnorderedWithFlowController<Self, ()>where
Self::Item: Stream + Unpin,
Self: Sized,
fn flatten_unordered( self, limit: impl Into<Option<usize>> ) -> FlattenUnorderedWithFlowController<Self, ()>where Self::Item: Stream + Unpin, Self: Sized,
§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where
F: FnMut(Self::Item) -> U,
U: Stream,
Self: Sized,
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where F: FnMut(Self::Item) -> U, U: Stream, Self: Sized,
§fn flat_map_unordered<U, F>(
self,
limit: impl Into<Option<usize>>,
f: F
) -> FlatMapUnordered<Self, U, F>where
U: Stream + Unpin,
F: FnMut(Self::Item) -> U,
Self: Sized,
fn flat_map_unordered<U, F>( self, limit: impl Into<Option<usize>>, f: F ) -> FlatMapUnordered<Self, U, F>where U: Stream + Unpin, F: FnMut(Self::Item) -> U, Self: Sized,
StreamExt::map
] but flattens nested Stream
s
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>where
F: FnMut(&mut S, Self::Item) -> Fut,
Fut: Future<Output = Option<B>>,
Self: Sized,
fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>where F: FnMut(&mut S, Self::Item) -> Fut, Fut: Future<Output = Option<B>>, Self: Sized,
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>where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
true
. Read more§fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
true
. Read more§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>where
Fut: Future,
Self: Sized,
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>where Fut: Future, Self: Sized,
§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
Self: Sized,
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = ()>, Self: Sized,
§fn for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F
) -> ForEachConcurrent<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
Self: Sized,
fn for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F ) -> ForEachConcurrent<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = ()>, Self: Sized,
§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where Self: Sized,
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,
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,
§fn boxed<'a>(
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a, Global>>where
Self: Sized + Send + 'a,
fn boxed<'a>( self ) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a, Global>>where Self: Sized + Send + 'a,
§fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>>where Self: Sized + 'a,
§fn buffered(self, n: usize) -> Buffered<Self>where
Self::Item: Future,
Self: Sized,
fn buffered(self, n: usize) -> Buffered<Self>where Self::Item: Future, Self: Sized,
§fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>where
Self::Item: Future,
Self: Sized,
fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>where Self::Item: Future, Self: Sized,
§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,
§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,
§fn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where Self: Sized,
peek
method. Read more§fn chunks(self, capacity: usize) -> Chunks<Self>where
Self: Sized,
fn chunks(self, capacity: usize) -> Chunks<Self>where Self: Sized,
§fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
Self: Sized,
fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where Self: Sized,
§fn forward<S>(self, sink: S) -> Forward<Self, S>where
S: Sink<Self::Ok, Error = Self::Error>,
Self: TryStream + Sized,
fn forward<S>(self, sink: S) -> Forward<Self, S>where S: Sink<Self::Ok, Error = Self::Error>, Self: TryStream + Sized,
§fn inspect<F>(self, f: F) -> Inspect<Self, F>where
F: FnMut(&Self::Item),
Self: Sized,
fn inspect<F>(self, f: F) -> Inspect<Self, F>where F: FnMut(&Self::Item), Self: Sized,
§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,
§fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where Self: Unpin,
Stream::poll_next
] on Unpin
stream types.§fn select_next_some(&mut self) -> SelectNextSome<'_, Self>where
Self: Unpin + FusedStream,
fn select_next_some(&mut self) -> SelectNextSome<'_, Self>where Self: Unpin + FusedStream,
§impl<St> StreamExt for Stwhere
St: Stream + ?Sized,
impl<St> StreamExt for Stwhere St: Stream + ?Sized,
§fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
fn next(&mut self) -> Next<'_, Self>where Self: Unpin,
None
if the
stream is finished. Read more§fn try_next<T, E>(&mut self) -> TryNext<'_, Self>where
Self: Stream<Item = Result<T, E>> + Unpin,
fn try_next<T, E>(&mut self) -> TryNext<'_, Self>where Self: Stream<Item = Result<T, E>> + Unpin,
§fn map<T, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
Self: Sized,
fn map<T, F>(self, f: F) -> Map<Self, F>where F: FnMut(Self::Item) -> T, Self: Sized,
§fn map_while<T, F>(self, f: F) -> MapWhile<Self, F>where
F: FnMut(Self::Item) -> Option<T>,
Self: Sized,
fn map_while<T, F>(self, f: F) -> MapWhile<Self, F>where F: FnMut(Self::Item) -> Option<T>, Self: Sized,
None
. Read more§fn then<F, Fut>(self, f: F) -> Then<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future,
Self: Sized,
fn then<F, Fut>(self, f: F) -> Then<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future, Self: Sized,
§fn merge<U>(self, other: U) -> Merge<Self, U>where
U: Stream<Item = Self::Item>,
Self: Sized,
fn merge<U>(self, other: U) -> Merge<Self, U>where U: Stream<Item = Self::Item>, Self: Sized,
§fn filter<F>(self, f: F) -> Filter<Self, F>where
F: FnMut(&Self::Item) -> bool,
Self: Sized,
fn filter<F>(self, f: F) -> Filter<Self, F>where F: FnMut(&Self::Item) -> bool, Self: Sized,
§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where
F: FnMut(Self::Item) -> Option<T>,
Self: Sized,
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where F: FnMut(Self::Item) -> Option<T>, Self: Sized,
§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where Self: Sized,
None
. Read more§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where Self: Sized,
n
items of the underlying stream. Read more§fn take_while<F>(self, f: F) -> TakeWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
Self: Sized,
fn take_while<F>(self, f: F) -> TakeWhile<Self, F>where F: FnMut(&Self::Item) -> bool, Self: Sized,
true
. Read more§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where Self: Sized,
n
first items of the
underlying stream. Read more§fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
Self: Sized,
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>where F: FnMut(&Self::Item) -> bool, Self: Sized,
true
. Read more§fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>where Self: Unpin, F: FnMut(Self::Item) -> bool,
§fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>where Self: Unpin, F: FnMut(Self::Item) -> bool,
§fn chain<U>(self, other: U) -> Chain<Self, U>where
U: Stream<Item = Self::Item>,
Self: Sized,
fn chain<U>(self, other: U) -> Chain<Self, U>where U: Stream<Item = Self::Item>, Self: Sized,
§fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F>where
Self: Sized,
F: FnMut(B, Self::Item) -> B,
fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F>where Self: Sized, F: FnMut(B, Self::Item) -> B,
§fn collect<T>(self) -> Collect<Self, T>where
T: FromStream<Self::Item>,
Self: Sized,
fn collect<T>(self) -> Collect<Self, T>where T: FromStream<Self::Item>, Self: Sized,
§fn timeout(self, duration: Duration) -> Timeout<Self>where
Self: Sized,
fn timeout(self, duration: Duration) -> Timeout<Self>where Self: Sized,
§fn timeout_repeating(self, interval: Interval) -> TimeoutRepeating<Self>where
Self: Sized,
fn timeout_repeating(self, interval: Interval) -> TimeoutRepeating<Self>where Self: Sized,
§impl<S> TryStreamExt for Swhere
S: TryStream + ?Sized,
impl<S> TryStreamExt for Swhere S: TryStream + ?Sized,
§fn err_into<E>(self) -> ErrInto<Self, E>where
Self: Sized,
Self::Error: Into<E>,
fn err_into<E>(self) -> ErrInto<Self, E>where Self: Sized, Self::Error: Into<E>,
§fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>where
Self: Sized,
F: FnMut(Self::Ok) -> T,
fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>where Self: Sized, F: FnMut(Self::Ok) -> T,
§fn map_err<E, F>(self, f: F) -> MapErr<Self, F>where
Self: Sized,
F: FnMut(Self::Error) -> E,
fn map_err<E, F>(self, f: F) -> MapErr<Self, F>where Self: Sized, F: FnMut(Self::Error) -> E,
§fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>where
F: FnMut(Self::Ok) -> Fut,
Fut: TryFuture<Error = Self::Error>,
Self: Sized,
fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>where F: FnMut(Self::Ok) -> Fut, Fut: TryFuture<Error = Self::Error>, Self: Sized,
f
. Read more§fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>where
F: FnMut(Self::Error) -> Fut,
Fut: TryFuture<Ok = Self::Ok>,
Self: Sized,
fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>where F: FnMut(Self::Error) -> Fut, Fut: TryFuture<Ok = Self::Ok>, Self: Sized,
f
. Read more§fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>where
F: FnMut(&Self::Ok),
Self: Sized,
fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>where F: FnMut(&Self::Ok), Self: Sized,
§fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>where
F: FnMut(&Self::Error),
Self: Sized,
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>where F: FnMut(&Self::Error), Self: Sized,
§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,
§fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F>where
F: FnMut(Self::Ok) -> Fut,
Fut: TryFuture<Ok = (), Error = Self::Error>,
Self: Sized,
fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F>where F: FnMut(Self::Ok) -> Fut, Fut: TryFuture<Ok = (), Error = Self::Error>, Self: Sized,
§fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>where
F: FnMut(&Self::Ok) -> Fut,
Fut: TryFuture<Ok = bool, Error = Self::Error>,
Self: Sized,
fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>where F: FnMut(&Self::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = Self::Error>, Self: Sized,
true
. Read more§fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>where
F: FnMut(&Self::Ok) -> Fut,
Fut: TryFuture<Ok = bool, Error = Self::Error>,
Self: Sized,
fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>where F: FnMut(&Self::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = Self::Error>, Self: Sized,
true
. Read more§fn try_for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F
) -> TryForEachConcurrent<Self, Fut, F>where
F: FnMut(Self::Ok) -> Fut,
Fut: Future<Output = Result<(), Self::Error>>,
Self: Sized,
fn try_for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F ) -> TryForEachConcurrent<Self, Fut, F>where F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = Result<(), Self::Error>>, Self: Sized,
§fn try_collect<C>(self) -> TryCollect<Self, C>where
C: Default + Extend<Self::Ok>,
Self: Sized,
fn try_collect<C>(self) -> TryCollect<Self, C>where C: Default + Extend<Self::Ok>, Self: Sized,
§fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
Self: Sized,
fn try_chunks(self, capacity: usize) -> TryChunks<Self>where Self: Sized,
§fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>where
Fut: Future<Output = bool>,
F: FnMut(&Self::Ok) -> Fut,
Self: Sized,
fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>where Fut: Future<Output = bool>, F: FnMut(&Self::Ok) -> Fut, Self: Sized,
§fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>where
Fut: TryFuture<Ok = Option<T>, Error = Self::Error>,
F: FnMut(Self::Ok) -> Fut,
Self: Sized,
fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>where Fut: TryFuture<Ok = Option<T>, Error = Self::Error>, F: FnMut(Self::Ok) -> Fut, Self: Sized,
§fn try_flatten_unordered(
self,
limit: impl Into<Option<usize>>
) -> TryFlattenUnordered<Self>where
Self::Ok: TryStream + Unpin,
<Self::Ok as TryStream>::Error: From<Self::Error>,
Self: Sized,
fn try_flatten_unordered( self, limit: impl Into<Option<usize>> ) -> TryFlattenUnordered<Self>where Self::Ok: TryStream + Unpin, <Self::Ok as TryStream>::Error: From<Self::Error>, Self: Sized,
§fn try_flatten(self) -> TryFlatten<Self>where
Self::Ok: TryStream,
<Self::Ok as TryStream>::Error: From<Self::Error>,
Self: Sized,
fn try_flatten(self) -> TryFlatten<Self>where Self::Ok: TryStream, <Self::Ok as TryStream>::Error: From<Self::Error>, Self: Sized,
§fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F>where
F: FnMut(T, Self::Ok) -> Fut,
Fut: TryFuture<Ok = T, Error = Self::Error>,
Self: Sized,
fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F>where F: FnMut(T, Self::Ok) -> Fut, Fut: TryFuture<Ok = T, Error = Self::Error>, Self: Sized,
§fn try_concat(self) -> TryConcat<Self>where
Self: Sized,
Self::Ok: Extend<<Self::Ok as IntoIterator>::Item> + IntoIterator + Default,
fn try_concat(self) -> TryConcat<Self>where Self: Sized, Self::Ok: Extend<<Self::Ok as IntoIterator>::Item> + IntoIterator + Default,
§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,
§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,
§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,
TryStream::try_poll_next
] on Unpin
stream types.§fn into_async_read(self) -> IntoAsyncRead<Self>where
Self: Sized + TryStreamExt<Error = Error>,
Self::Ok: AsRef<[u8]>,
fn into_async_read(self) -> IntoAsyncRead<Self>where Self: Sized + TryStreamExt<Error = Error>, Self::Ok: AsRef<[u8]>,
AsyncBufRead
. Read more