Struct EventStream
pub struct EventStream<S, T = String>where
T: EventDataRead,{ /* private fields */ }http and std only.Expand description
Decode a stream of byte chunks into SSE events.
Wraps EventDecoder, which can also inspect borrowed chunks directly.
Input is unlimited by default. Set max_line_len
and max_event_len for limits per line and event.
BodyLimit or Body::limited instead caps the entire body, terminating
even a long-lived stream once that budget is exhausted.
Implementations§
§impl<S, T> EventStream<S, T>where
T: EventDataRead,
impl<S, T> EventStream<S, T>where
T: EventDataRead,
pub fn new(stream: S) -> EventStream<S, T>
pub fn new(stream: S) -> EventStream<S, T>
Initialize the EventStream with a Stream
pub fn maybe_with_max_line_len(self, max: Option<usize>) -> EventStream<S, T>
pub fn maybe_with_max_line_len(self, max: Option<usize>) -> EventStream<S, T>
Fail decoding once a single line grows past max bytes,
terminator excluded.
pub fn maybe_set_max_line_len(
&mut self,
max: Option<usize>,
) -> &mut EventStream<S, T>
pub fn maybe_set_max_line_len( &mut self, max: Option<usize>, ) -> &mut EventStream<S, T>
Fail decoding once a single line grows past max bytes,
terminator excluded.
pub fn with_max_line_len(self, max: usize) -> EventStream<S, T>
pub fn with_max_line_len(self, max: usize) -> EventStream<S, T>
Fail decoding once a single line grows past max bytes,
terminator excluded.
pub fn set_max_line_len(&mut self, max: usize) -> &mut EventStream<S, T>
pub fn set_max_line_len(&mut self, max: usize) -> &mut EventStream<S, T>
Fail decoding once a single line grows past max bytes,
terminator excluded.
pub fn without_max_line_len(self) -> EventStream<S, T>
pub fn without_max_line_len(self) -> EventStream<S, T>
Fail decoding once a single line grows past max bytes,
terminator excluded.
pub fn unset_max_line_len(&mut self) -> &mut EventStream<S, T>
pub fn unset_max_line_len(&mut self) -> &mut EventStream<S, T>
Fail decoding once a single line grows past max bytes,
terminator excluded.
pub fn maybe_with_max_event_len(self, max: Option<usize>) -> EventStream<S, T>
pub fn maybe_with_max_event_len(self, max: Option<usize>) -> EventStream<S, T>
Fail decoding once the lines accumulated into one event grow
past max bytes.
pub fn maybe_set_max_event_len(
&mut self,
max: Option<usize>,
) -> &mut EventStream<S, T>
pub fn maybe_set_max_event_len( &mut self, max: Option<usize>, ) -> &mut EventStream<S, T>
Fail decoding once the lines accumulated into one event grow
past max bytes.
pub fn with_max_event_len(self, max: usize) -> EventStream<S, T>
pub fn with_max_event_len(self, max: usize) -> EventStream<S, T>
Fail decoding once the lines accumulated into one event grow
past max bytes.
pub fn set_max_event_len(&mut self, max: usize) -> &mut EventStream<S, T>
pub fn set_max_event_len(&mut self, max: usize) -> &mut EventStream<S, T>
Fail decoding once the lines accumulated into one event grow
past max bytes.
pub fn without_max_event_len(self) -> EventStream<S, T>
pub fn without_max_event_len(self) -> EventStream<S, T>
Fail decoding once the lines accumulated into one event grow
past max bytes.
pub fn unset_max_event_len(&mut self) -> &mut EventStream<S, T>
pub fn unset_max_event_len(&mut self) -> &mut EventStream<S, T>
Fail decoding once the lines accumulated into one event grow
past max bytes.
pub fn maybe_with_on_incomplete(
self,
cb: Option<Box<dyn FnOnce(Vec<u8>) + Sync + Send>>,
) -> EventStream<S, T>
pub fn maybe_with_on_incomplete( self, cb: Option<Box<dyn FnOnce(Vec<u8>) + Sync + Send>>, ) -> EventStream<S, T>
Pass a nonempty buffered partial line to cb at most once,
when the body ends or the stream is dropped.
pub fn maybe_set_on_incomplete(
&mut self,
cb: Option<Box<dyn FnOnce(Vec<u8>) + Sync + Send>>,
) -> &mut EventStream<S, T>
pub fn maybe_set_on_incomplete( &mut self, cb: Option<Box<dyn FnOnce(Vec<u8>) + Sync + Send>>, ) -> &mut EventStream<S, T>
Pass a nonempty buffered partial line to cb at most once,
when the body ends or the stream is dropped.
pub fn with_on_incomplete(
self,
cb: Box<dyn FnOnce(Vec<u8>) + Sync + Send>,
) -> EventStream<S, T>
pub fn with_on_incomplete( self, cb: Box<dyn FnOnce(Vec<u8>) + Sync + Send>, ) -> EventStream<S, T>
Pass a nonempty buffered partial line to cb at most once,
when the body ends or the stream is dropped.
pub fn set_on_incomplete(
&mut self,
cb: Box<dyn FnOnce(Vec<u8>) + Sync + Send>,
) -> &mut EventStream<S, T>
pub fn set_on_incomplete( &mut self, cb: Box<dyn FnOnce(Vec<u8>) + Sync + Send>, ) -> &mut EventStream<S, T>
Pass a nonempty buffered partial line to cb at most once,
when the body ends or the stream is dropped.
pub fn without_on_incomplete(self) -> EventStream<S, T>
pub fn without_on_incomplete(self) -> EventStream<S, T>
Pass a nonempty buffered partial line to cb at most once,
when the body ends or the stream is dropped.
pub fn unset_on_incomplete(&mut self) -> &mut EventStream<S, T>
pub fn unset_on_incomplete(&mut self) -> &mut EventStream<S, T>
Pass a nonempty buffered partial line to cb at most once,
when the body ends or the stream is dropped.
pub fn with_lenient(self, lenient: bool) -> EventStream<S, T>
pub fn with_lenient(self, lenient: bool) -> EventStream<S, T>
Recover from a decode fault instead of ending the stream, skipping to the next event boundary.
pub fn set_lenient(&mut self, lenient: bool) -> &mut EventStream<S, T>
pub fn set_lenient(&mut self, lenient: bool) -> &mut EventStream<S, T>
Recover from a decode fault instead of ending the stream, skipping to the next event boundary.
pub fn maybe_with_on_resync(
self,
sink: Option<Arc<dyn ErrorSink>>,
) -> EventStream<S, T>
pub fn maybe_with_on_resync( self, sink: Option<Arc<dyn ErrorSink>>, ) -> EventStream<S, T>
pub fn maybe_set_on_resync(
&mut self,
sink: Option<Arc<dyn ErrorSink>>,
) -> &mut EventStream<S, T>
pub fn maybe_set_on_resync( &mut self, sink: Option<Arc<dyn ErrorSink>>, ) -> &mut EventStream<S, T>
pub fn with_on_resync(self, sink: Arc<dyn ErrorSink>) -> EventStream<S, T>
pub fn with_on_resync(self, sink: Arc<dyn ErrorSink>) -> EventStream<S, T>
pub fn set_on_resync(
&mut self,
sink: Arc<dyn ErrorSink>,
) -> &mut EventStream<S, T>
pub fn set_on_resync( &mut self, sink: Arc<dyn ErrorSink>, ) -> &mut EventStream<S, T>
pub fn without_on_resync(self) -> EventStream<S, T>
pub fn without_on_resync(self) -> EventStream<S, T>
pub fn unset_on_resync(&mut self) -> &mut EventStream<S, T>
pub fn unset_on_resync(&mut self) -> &mut EventStream<S, T>
pub fn try_set_last_event_id(
&mut self,
id: impl Into<SmolStr>,
) -> Result<(), Box<dyn Error + Sync + Send>>
pub fn try_set_last_event_id( &mut self, id: impl Into<SmolStr>, ) -> Result<(), Box<dyn Error + Sync + Send>>
Set the last event ID of the stream. Useful for initializing the stream with a previous last event ID
pub fn last_event_id(&self) -> Option<&str>
pub fn last_event_id(&self) -> Option<&str>
Get the last event ID of the stream
pub fn resync_count(&self) -> usize
pub fn resync_count(&self) -> usize
How many resyncs have happened in lenient mode.
Trait Implementations§
§impl<S, T> Debug for EventStream<S, T>
impl<S, T> Debug for EventStream<S, T>
§impl<S, B, E, T> Stream for EventStream<S, T>
impl<S, B, E, T> Stream for EventStream<S, T>
§fn poll_next(
self: Pin<&mut EventStream<S, T>>,
cx: &mut Context<'_>,
) -> Poll<Option<<EventStream<S, T> as Stream>::Item>>
fn poll_next( self: Pin<&mut EventStream<S, T>>, cx: &mut Context<'_>, ) -> Poll<Option<<EventStream<S, T> as Stream>::Item>>
None if the stream is exhausted. Read moreimpl<'__pin, S, T> Unpin for EventStream<S, T>where
T: EventDataRead,
<PinnedFieldsOfHelperStruct<__Origin<'__pin, S, T>> as PinnedFieldsOfHelperTrait>::Actual: Unpin,
Auto Trait Implementations§
impl<S, T = String> !RefUnwindSafe for EventStream<S, T>
impl<S, T = String> !UnwindSafe for EventStream<S, T>
impl<S, T> Freeze for EventStream<S, T>
impl<S, T> Send for EventStream<S, T>
impl<S, T> Sync for EventStream<S, T>
impl<S, T> UnsafeUnpin for EventStream<S, 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> ⓘ
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
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> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> IntoStreamingRequest for T
impl<T> IntoStreamingRequest for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> StreamExt for T
impl<T> StreamExt for T
§fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
§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>
§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>
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
§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>
§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
§fn collect<C>(self) -> Collect<Self, C> ⓘ
fn collect<C>(self) -> Collect<Self, C> ⓘ
§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
§fn concat(self) -> Concat<Self> ⓘ
fn concat(self) -> Concat<Self> ⓘ
§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> ⓘ
fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> ⓘ
§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
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> ⓘ
true if all element in stream satisfied a predicate. Read more§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
§fn flatten_unordered(
self,
limit: impl Into<Option<usize>>,
) -> FlattenUnorderedWithFlowController<Self, ()>
fn flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> FlattenUnorderedWithFlowController<Self, ()>
target_has_atomic=ptr and crate feature alloc only.§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>
target_has_atomic=ptr and crate feature alloc only.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>
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>
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>
true. Read more§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
§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> ⓘ
target_has_atomic=ptr and crate feature alloc only.§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,
std only.§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>>
alloc only.§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,
alloc only.§fn buffered(self, n: usize) -> Buffered<Self>
fn buffered(self, n: usize) -> Buffered<Self>
target_has_atomic=ptr and crate feature alloc only.§fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
target_has_atomic=ptr and crate feature alloc only.§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,
alloc only.§fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
Self: Sized,
fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
Self: Sized,
alloc only.§fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘ
fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘ
sink only.§fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
target_has_atomic=ptr and crate feature alloc and crate feature sink only.§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
§fn left_stream<B>(self) -> Either<Self, B> ⓘ
fn left_stream<B>(self) -> Either<Self, B> ⓘ
§fn right_stream<B>(self) -> Either<B, Self> ⓘ
fn right_stream<B>(self) -> Either<B, Self> ⓘ
§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 St
impl<St> StreamExt for St
§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>
fn try_next<T, E>(&mut self) -> TryNext<'_, Self>
§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
§fn map_while<T, F>(self, f: F) -> MapWhile<Self, F>
fn map_while<T, F>(self, f: F) -> MapWhile<Self, F>
None. Read more§fn then<F, Fut>(self, f: F) -> Then<Self, Fut, F>
fn then<F, Fut>(self, f: F) -> Then<Self, Fut, F>
§fn merge<U>(self, other: U) -> Merge<Self, U>
fn merge<U>(self, other: U) -> Merge<Self, U>
§fn filter<F>(self, f: F) -> Filter<Self, F>
fn filter<F>(self, f: F) -> Filter<Self, F>
§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
§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>
fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
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>
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
true. Read more§fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>
fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>
§fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>
fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>
§fn chain<U>(self, other: U) -> Chain<Self, U>
fn chain<U>(self, other: U) -> Chain<Self, U>
§fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F>
fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F>
§fn collect<T>(
self,
) -> Collect<Self, T, <T as FromStreamPriv<Self::Item>>::InternalCollection>
fn collect<T>( self, ) -> Collect<Self, T, <T as FromStreamPriv<Self::Item>>::InternalCollection>
§fn timeout(self, duration: Duration) -> Timeout<Self>where
Self: Sized,
fn timeout(self, duration: Duration) -> Timeout<Self>where
Self: Sized,
time only.§fn timeout_repeating(self, interval: Interval) -> TimeoutRepeating<Self>where
Self: Sized,
fn timeout_repeating(self, interval: Interval) -> TimeoutRepeating<Self>where
Self: Sized,
time only.§fn throttle(self, duration: Duration) -> Throttle<Self>where
Self: Sized,
fn throttle(self, duration: Duration) -> Throttle<Self>where
Self: Sized,
time only.§fn chunks_timeout(
self,
max_size: usize,
duration: Duration,
) -> ChunksTimeout<Self>where
Self: Sized,
fn chunks_timeout(
self,
max_size: usize,
duration: Duration,
) -> ChunksTimeout<Self>where
Self: Sized,
time only.§impl<S> TryStreamExt for S
impl<S> TryStreamExt for S
§fn err_into<E>(self) -> ErrInto<Self, E>
fn err_into<E>(self) -> ErrInto<Self, E>
§fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
§fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
§fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
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>
f. Read more§fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
§fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
§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> ⓘ
fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> ⓘ
§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>
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>
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> ⓘ
target_has_atomic=ptr and crate feature alloc only.§fn try_collect<C>(self) -> TryCollect<Self, C> ⓘ
fn try_collect<C>(self) -> TryCollect<Self, C> ⓘ
§fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
Self: Sized,
fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
Self: Sized,
alloc only.§fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where
Self: Sized,
fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where
Self: Sized,
alloc only.§fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
§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>
§fn try_flatten_unordered(
self,
limit: impl Into<Option<usize>>,
) -> TryFlattenUnordered<Self>
fn try_flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> TryFlattenUnordered<Self>
target_has_atomic=ptr and crate feature alloc only.§fn try_flatten(self) -> TryFlatten<Self>
fn try_flatten(self) -> TryFlatten<Self>
§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> ⓘ
§fn try_concat(self) -> TryConcat<Self> ⓘ
fn try_concat(self) -> TryConcat<Self> ⓘ
§fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>
fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>
target_has_atomic=ptr and crate feature alloc only.§fn try_buffered(self, n: usize) -> TryBuffered<Self>
fn try_buffered(self, n: usize) -> TryBuffered<Self>
target_has_atomic=ptr and crate feature alloc only.§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>
fn into_async_read(self) -> IntoAsyncRead<Self>
io and std only.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> ⓘ
Err is encountered or if an Ok item is found
that does not satisfy the predicate. Read more