pub struct TTryMapReady<I: TaskIterator, R> { /* private fields */ }Trait Implementations§
Source§impl<I, R> TaskIterator for TTryMapReady<I, R>where
I: TaskIterator,
R: 'static,
impl<I, R> TaskIterator for TTryMapReady<I, R>where
I: TaskIterator,
R: 'static,
Source§type Ready = R
type Ready = R
The type that indicates when a single or partial sequence
is what can be considered a intermediate and final result is. Read more
Source§type Pending = <I as TaskIterator>::Pending
type Pending = <I as TaskIterator>::Pending
The type to indicate pending operation, either can be a
time::Duration
to communicate time to completion or some other type you wish
to allow communication of the state of things before the Done signal
is received.Source§fn next_status(
&mut self,
ctx: Ctx,
) -> Option<TaskStatus<Self::Ready, Self::Pending>>
fn next_status( &mut self, ctx: Ctx, ) -> Option<TaskStatus<Self::Ready, Self::Pending>>
Advances the iterator and returns the next value.
Auto Trait Implementations§
impl<I, R> !RefUnwindSafe for TTryMapReady<I, R>
impl<I, R> !Send for TTryMapReady<I, R>
impl<I, R> !Sync for TTryMapReady<I, R>
impl<I, R> !UnwindSafe for TTryMapReady<I, R>
impl<I, R> Freeze for TTryMapReady<I, R>
impl<I, R> Unpin for TTryMapReady<I, R>
impl<I, R> UnsafeUnpin for TTryMapReady<I, R>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<I> TaskIteratorExt for Iwhere
I: TaskIterator + 'static,
<I as TaskIterator>::Ready: 'static,
<I as TaskIterator>::Pending: 'static,
impl<I> TaskIteratorExt for Iwhere
I: TaskIterator + 'static,
<I as TaskIterator>::Ready: 'static,
<I as TaskIterator>::Pending: 'static,
Source§fn map_ready<F, R>(self, f: F) -> TMapReady<I, R>
fn map_ready<F, R>(self, f: F) -> TMapReady<I, R>
Transform Ready values using the provided function. Read more
Source§fn map_pending<F, R>(self, f: F) -> TMapPending<I, R>
fn map_pending<F, R>(self, f: F) -> TMapPending<I, R>
Transform Pending values using the provided function. Read more
Source§fn filter_ready<F>(self, f: F) -> TFilterReady<I>
fn filter_ready<F>(self, f: F) -> TFilterReady<I>
Filter Ready values using the provided predicate. Read more
Source§fn stream_collect(self) -> TStreamCollect<I>where
<I as TaskIterator>::Ready: 'static,
fn stream_collect(self) -> TStreamCollect<I>where
<I as TaskIterator>::Ready: 'static,
Collect all Ready values into a Vec. Read more
Source§fn split_collector<P>(
self,
predicate: P,
queue_size: usize,
) -> (CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>, SplitCollectorContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
fn split_collector<P>(
self,
predicate: P,
queue_size: usize,
) -> (CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>, SplitCollectorContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
Split the iterator into an observer branch and a continuation branch. Read more
Source§fn split_collect_one<P>(
self,
predicate: P,
) -> (CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>, SplitCollectorContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
fn split_collect_one<P>(
self,
predicate: P,
) -> (CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>, SplitCollectorContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
Source§fn broadcast<P>(
self,
n: usize,
predicate: P,
queue_size: usize,
) -> (Vec<CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>>, BroadcastContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
fn broadcast<P>(
self,
n: usize,
predicate: P,
queue_size: usize,
) -> (Vec<CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>>, BroadcastContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
Fan each matched
Ready value out to N observer branches (each gets a
clone), returning the N observers plus a continuation carrying the full
stream onward (F45 N-way broadcast follow-on). Read moreSource§fn broadcast_lossy<P>(
self,
n: usize,
predicate: P,
queue_size: usize,
) -> (Vec<CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>>, BroadcastContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
fn broadcast_lossy<P>(
self,
n: usize,
predicate: P,
queue_size: usize,
) -> (Vec<CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>>, BroadcastContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
Like
broadcast but the source never stalls — a full
branch drops the incoming (newest) value (BroadcastPolicy::DropNewest). Read moreSource§fn broadcast_latest<P>(
self,
n: usize,
predicate: P,
queue_size: usize,
) -> (Vec<CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>>, BroadcastContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
fn broadcast_latest<P>(
self,
n: usize,
predicate: P,
queue_size: usize,
) -> (Vec<CollectorStreamIterator<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>>, BroadcastContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,
Like
broadcast but the source never stalls and every
branch is guaranteed the latest values — a full branch evicts its
oldest (BroadcastPolicy::DropOldest, via force_push). Read moreSource§fn split_collect_until<P>(
self,
predicate: P,
queue_size: usize,
) -> (SplitUntilObserver<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>, SplitUntilContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> CollectionState + 'static,
fn split_collect_until<P>(
self,
predicate: P,
queue_size: usize,
) -> (SplitUntilObserver<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>, SplitUntilContinuation<I>)where
I: Sized,
<I as TaskIterator>::Ready: Clone,
<I as TaskIterator>::Pending: Clone,
P: Fn(&<I as TaskIterator>::Ready) -> CollectionState + 'static,
Split the iterator into an observer branch and a continuation branch,
closing the observer when the predicate returns a close signal. Read more
Source§fn split_collect_until_map<F, D>(
self,
transform: F,
queue_size: usize,
) -> (SplitUntilObserverMap<D, <I as TaskIterator>::Pending>, SplitUntilContinuationMap<I, D>)where
I: Sized,
D: Clone + 'static,
<I as TaskIterator>::Pending: Clone,
F: Fn(&<I as TaskIterator>::Ready) -> (CollectionState, Option<D>) + 'static,
fn split_collect_until_map<F, D>(
self,
transform: F,
queue_size: usize,
) -> (SplitUntilObserverMap<D, <I as TaskIterator>::Pending>, SplitUntilContinuationMap<I, D>)where
I: Sized,
D: Clone + 'static,
<I as TaskIterator>::Pending: Clone,
F: Fn(&<I as TaskIterator>::Ready) -> (CollectionState, Option<D>) + 'static,
Split the iterator with transformation for observer. Read more
Source§fn split_collector_map<F, M>(
self,
transform: F,
queue_size: usize,
) -> (SplitCollectorMapObserver<M, <I as TaskIterator>::Pending>, SplitCollectorMapContinuation<I, M>)where
I: Sized,
M: Clone + 'static,
<I as TaskIterator>::Pending: Clone,
F: Fn(&<I as TaskIterator>::Ready) -> (bool, Option<M>) + 'static,
fn split_collector_map<F, M>(
self,
transform: F,
queue_size: usize,
) -> (SplitCollectorMapObserver<M, <I as TaskIterator>::Pending>, SplitCollectorMapContinuation<I, M>)where
I: Sized,
M: Clone + 'static,
<I as TaskIterator>::Pending: Clone,
F: Fn(&<I as TaskIterator>::Ready) -> (bool, Option<M>) + 'static,
Split the iterator into an observer branch and a continuation branch,
mapping matched Ready values to a different type before sending to the observer. Read more
Source§fn split_collect_one_map<F, M>(
self,
transform: F,
) -> (SplitCollectorMapObserver<M, <I as TaskIterator>::Pending>, SplitCollectorMapContinuation<I, M>)where
I: Sized,
M: Clone + 'static,
<I as TaskIterator>::Pending: Clone,
F: Fn(&<I as TaskIterator>::Ready) -> (bool, Option<M>) + 'static,
fn split_collect_one_map<F, M>(
self,
transform: F,
) -> (SplitCollectorMapObserver<M, <I as TaskIterator>::Pending>, SplitCollectorMapContinuation<I, M>)where
I: Sized,
M: Clone + 'static,
<I as TaskIterator>::Pending: Clone,
F: Fn(&<I as TaskIterator>::Ready) -> (bool, Option<M>) + 'static,
Source§fn map_circuit<F>(self, f: F) -> TMapCircuit<I>where
I: Sized,
F: Fn(TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> TaskShortCircuit<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending> + 'static,
fn map_circuit<F>(self, f: F) -> TMapCircuit<I>where
I: Sized,
F: Fn(TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> TaskShortCircuit<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending> + 'static,
Short-circuit the iterator based on a circuit function. Read more
Source§fn map_iter<F, InnerIter, InnerR, InnerP>(
self,
mapper: F,
) -> TMapIter<I, F, InnerIter, InnerR, InnerP, <I as TaskIterator>::Ready, <I as TaskIterator>::Pending>where
I: Sized,
F: Fn(<I as TaskIterator>::Ready) -> InnerIter + 'static,
InnerIter: Iterator<Item = TaskStatus<InnerR, InnerP>> + 'static,
InnerR: 'static,
InnerP: 'static,
<I as TaskIterator>::Pending: Into<InnerP> + 'static,
fn map_iter<F, InnerIter, InnerR, InnerP>(
self,
mapper: F,
) -> TMapIter<I, F, InnerIter, InnerR, InnerP, <I as TaskIterator>::Ready, <I as TaskIterator>::Pending>where
I: Sized,
F: Fn(<I as TaskIterator>::Ready) -> InnerIter + 'static,
InnerIter: Iterator<Item = TaskStatus<InnerR, InnerP>> + 'static,
InnerR: 'static,
InnerP: 'static,
<I as TaskIterator>::Pending: Into<InnerP> + 'static,
Flatten nested iterator patterns where outer yields inner iterators. Read more
Source§fn flatten_ready(self) -> TFlattenReady<I>where
I: Sized,
<I as TaskIterator>::Ready: IntoIterator,
<<I as TaskIterator>::Ready as IntoIterator>::Item: 'static,
fn flatten_ready(self) -> TFlattenReady<I>where
I: Sized,
<I as TaskIterator>::Ready: IntoIterator,
<<I as TaskIterator>::Ready as IntoIterator>::Item: 'static,
Flatten Ready values that implement
IntoIterator. Read moreSource§fn flatten_pending(self) -> TFlattenPending<I>where
I: Sized,
<I as TaskIterator>::Pending: IntoIterator,
<<I as TaskIterator>::Pending as IntoIterator>::Item: 'static,
fn flatten_pending(self) -> TFlattenPending<I>where
I: Sized,
<I as TaskIterator>::Pending: IntoIterator,
<<I as TaskIterator>::Pending as IntoIterator>::Item: 'static,
Flatten Pending values that implement
IntoIterator. Read moreSource§fn flat_map_ready<F, U>(self, f: F) -> TFlatMapReady<I, F, U>where
I: Sized,
F: Fn(<I as TaskIterator>::Ready) -> U + 'static,
U: IntoIterator,
<U as IntoIterator>::Item: 'static,
fn flat_map_ready<F, U>(self, f: F) -> TFlatMapReady<I, F, U>where
I: Sized,
F: Fn(<I as TaskIterator>::Ready) -> U + 'static,
U: IntoIterator,
<U as IntoIterator>::Item: 'static,
Flat map Ready values - transform and flatten in one operation. Read more
Source§fn flat_map_pending<F, U>(self, f: F) -> TFlatMapPending<I, F, U>where
I: Sized,
F: Fn(<I as TaskIterator>::Pending) -> U + 'static,
U: IntoIterator,
<U as IntoIterator>::Item: 'static,
fn flat_map_pending<F, U>(self, f: F) -> TFlatMapPending<I, F, U>where
I: Sized,
F: Fn(<I as TaskIterator>::Pending) -> U + 'static,
U: IntoIterator,
<U as IntoIterator>::Item: 'static,
Flat map Pending values - transform and flatten in one operation. Read more
Source§fn map_state<F>(self, f: F) -> TMapState<I, F>where
F: Fn(TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending> + 'static,
fn map_state<F>(self, f: F) -> TMapState<I, F>where
F: Fn(TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending> + 'static,
Transform any
TaskStatus with full state access.Source§fn inspect_state<F>(self, f: F) -> TInspectState<I, F>
fn inspect_state<F>(self, f: F) -> TInspectState<I, F>
Side-effect on any
TaskStatus.Source§fn filter_state<F>(self, f: F) -> TFilterState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
fn filter_state<F>(self, f: F) -> TFilterState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
Filter based on full
TaskStatus. Non-matching items return TaskStatus::Ignore.Source§fn take_while_state<F>(self, predicate: F) -> TTakeWhileState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
fn take_while_state<F>(self, predicate: F) -> TTakeWhileState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
Take items while state predicate returns true.
Source§fn transform_until<F>(self, transformer: F) -> TTransformUntil<I, F>where
F: Fn(TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> Option<TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>> + 'static,
fn transform_until<F>(self, transformer: F) -> TTransformUntil<I, F>where
F: Fn(TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> Option<TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>> + 'static,
Transform items until transformer returns None.
When transformer returns None, iterator terminates.
Source§fn skip_while_state<F>(self, predicate: F) -> TSkipWhileState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
fn skip_while_state<F>(self, predicate: F) -> TSkipWhileState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
Skip items while state predicate returns true.
Source§fn take_state<F>(self, n: usize, state_predicate: F) -> TTakeState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
fn take_state<F>(self, n: usize, state_predicate: F) -> TTakeState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
Take at most n items matching state predicate.
Source§fn skip_state<F>(self, n: usize, state_predicate: F) -> TSkipState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
fn skip_state<F>(self, n: usize, state_predicate: F) -> TSkipState<I, F>where
F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) -> bool + 'static,
Skip first n items matching state predicate.
Source§fn fold<F, R>(self, init: R, f: F) -> TFold<I, F, R>
fn fold<F, R>(self, init: R, f: F) -> TFold<I, F, R>
Fold/accumulate values. Returns final accumulator when done.
fn try_map_ready<F, R>(self, f: F) -> TTryMapReady<I, R>
Source§fn take<F>(
self,
n: usize,
) -> TTakeState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>where
Self::Ready: 'static,
fn take<F>(
self,
n: usize,
) -> TTakeState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>where
Self::Ready: 'static,
Take while predicate true on Ready values, pass through non-Ready.
Source§fn take_all(
self,
n: usize,
) -> TTakeState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
fn take_all( self, n: usize, ) -> TTakeState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
Take at most n items of any state.
Source§fn skip(
self,
n: usize,
) -> TSkipState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>where
Self::Ready: 'static,
fn skip(
self,
n: usize,
) -> TSkipState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>where
Self::Ready: 'static,
Skip first n Ready items, return all others unchanged.
Source§fn skip_all(
self,
n: usize,
) -> TSkipState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
fn skip_all( self, n: usize, ) -> TSkipState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
Skip first n items of any state.
Source§fn take_while<F>(
self,
f: F,
) -> TTakeWhileState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
fn take_while<F>( self, f: F, ) -> TTakeWhileState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
Take while predicate true on Ready values, pass through non-Ready.
Source§fn take_while_any<F>(self, f: F) -> TTakeWhileState<Self, F>
fn take_while_any<F>(self, f: F) -> TTakeWhileState<Self, F>
Take while predicate true on ANY state.
Source§fn skip_while<F>(
self,
f: F,
) -> TSkipWhileState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
fn skip_while<F>( self, f: F, ) -> TSkipWhileState<Self, impl Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool>
Skip while predicate true on Ready values, return all others.
Source§fn skip_while_any<F>(self, f: F) -> TSkipWhileState<Self, F>
fn skip_while_any<F>(self, f: F) -> TSkipWhileState<Self, F>
Skip while predicate true on ANY state.
Source§fn enumerate(self) -> TEnumerate<Self>
fn enumerate(self) -> TEnumerate<Self>
Add index to Ready items, changing Ready type from D to (usize, D).