Skip to main content

TTryMapReady

Struct TTryMapReady 

Source
pub struct TTryMapReady<I: TaskIterator, R> { /* private fields */ }

Trait Implementations§

Source§

impl<I, R> TaskIterator for TTryMapReady<I, R>
where I: TaskIterator, R: 'static,

Source§

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

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>>

Advances the iterator and returns the next value.
Source§

fn with_ctx(self, ctx: Ctx) -> TaskAsIterator<Self::Ready, Self::Pending> ⓘ
where Self: Sized + 'static, Self::Ready: 'static, Self::Pending: 'static,

Wraps this task in the contextual orchestrator, TaskAsIterator, seeding it with ctx. Read more

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>
where I: Freeze, Box<dyn Fn(<I as TaskIterator>::Ready) -> Option<R>>: Freeze,

§

impl<I, R> Unpin for TTryMapReady<I, R>
where I: Unpin, Box<dyn Fn(<I as TaskIterator>::Ready) -> Option<R>>: Unpin,

§

impl<I, R> UnsafeUnpin for TTryMapReady<I, R>
where I: UnsafeUnpin, Box<dyn Fn(<I as TaskIterator>::Ready) -> Option<R>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<I> TaskIteratorExt for I
where 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>
where F: Fn(<I as TaskIterator>::Ready) -> R + 'static, R: 'static,

Transform Ready values using the provided function. Read more
Source§

fn map_pending<F, R>(self, f: F) -> TMapPending<I, R>
where F: Fn(<I as TaskIterator>::Pending) -> R + 'static, R: 'static,

Transform Pending values using the provided function. Read more
Source§

fn filter_ready<F>(self, f: F) -> TFilterReady<I>
where F: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,

Filter Ready values using the provided predicate. Read more
Source§

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,

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,

Convenience method: split_collector with queue_size = 1. Read more
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,

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 more
Source§

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 more
Source§

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 more
Source§

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,

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,

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,

Convenience method: split_collector_map with queue_size = 1. Read more
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,

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,

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,

Flatten Ready values that implement IntoIterator. Read more
Source§

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 more
Source§

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,

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,

Transform any TaskStatus with full state access.
Source§

fn inspect_state<F>(self, f: F) -> TInspectState<I, F>
where F: Fn(&TaskStatus<<I as TaskIterator>::Ready, <I as TaskIterator>::Pending>) + 'static,

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,

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,

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,

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,

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,

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,

Skip first n items matching state predicate.
Source§

fn find<F>(self, predicate: F) -> TFind<I, F>
where F: Fn(&<I as TaskIterator>::Ready) -> bool + 'static,

Find first item matching predicate.
Source§

fn find_map<F, R>(self, f: F) -> TFindMap<I, F, R>
where F: Fn(<I as TaskIterator>::Ready) -> Option<R> + 'static, R: 'static,

Find first item mapping to Some value.
Source§

fn fold<F, R>(self, init: R, f: F) -> TFold<I, F, R>
where F: Fn(R, <I as TaskIterator>::Ready) -> R + 'static, R: 'static,

Fold/accumulate values. Returns final accumulator when done.
Source§

fn all<F>(self, f: F) -> TAll<I, F>
where F: Fn(<I as TaskIterator>::Ready) -> bool + 'static,

Check if all Ready items satisfy predicate.
Source§

fn any<F>(self, f: F) -> TAny<I, F>
where F: Fn(<I as TaskIterator>::Ready) -> bool + 'static,

Check if any Ready item satisfies predicate.
Source§

fn count(self) -> TCount<I>

Count Ready items.
Source§

fn count_all(self) -> TCountAll<I>

Count all items (any state).
Source§

fn try_map_ready<F, R>(self, f: F) -> TTryMapReady<I, R>
where F: Fn(<I as TaskIterator>::Ready) -> Option<R> + 'static, R: 'static,

Source§

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>

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,

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>

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>
where F: Fn(&Self::Ready) -> bool + 'static,

Take while predicate true on Ready values, pass through non-Ready.
Source§

fn take_while_any<F>(self, f: F) -> TTakeWhileState<Self, F>
where F: Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool + 'static,

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>
where F: Fn(&Self::Ready) -> bool + 'static,

Skip while predicate true on Ready values, return all others.
Source§

fn skip_while_any<F>(self, f: F) -> TSkipWhileState<Self, F>
where F: Fn(&TaskStatus<Self::Ready, Self::Pending>) -> bool + 'static,

Skip while predicate true on ANY state.
Source§

fn enumerate(self) -> TEnumerate<Self>

Add index to Ready items, changing Ready type from D to (usize, D).
Source§

fn into_task_iter(self) -> TaskIter<Self>
where Self: Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more