pub struct Flow<In, Out, Mat = NotUsed> { /* private fields */ }Implementations§
Source§impl<In: Send + 'static, Out: Send + 'static> Flow<In, Out, NotUsed>
impl<In: Send + 'static, Out: Send + 'static> Flow<In, Out, NotUsed>
pub fn from_sink_and_source<InMat, OutMat>( sink: Sink<In, InMat>, source: Source<Out, OutMat>, ) -> Self
pub fn from_sink_and_source_coupled<InMat, OutMat>( sink: Sink<In, InMat>, source: Source<Out, OutMat>, ) -> Self
pub fn future_flow<InnerMat, F, Fut>( future: F, ) -> Flow<In, Out, StreamCompletion<InnerMat>>
pub fn lazy_flow<InnerMat, F>( create: F, ) -> Flow<In, Out, StreamCompletion<InnerMat>>
pub fn lazy_future_flow<InnerMat, F, Fut>( create: F, ) -> Flow<In, Out, StreamCompletion<InnerMat>>
Source§impl<In: Send + 'static, Out: Send + 'static, Mat: Send + 'static> Flow<In, Out, Mat>
impl<In: Send + 'static, Out: Send + 'static, Mat: Send + 'static> Flow<In, Out, Mat>
pub fn as_flow_with_context<U, CtxIn, CtxOut, Collapse, Extract>( self, collapse_context: Collapse, extract_context: Extract, ) -> FlowWithContext<U, CtxIn, Out, CtxOut, Mat>
pub fn attributes(&self) -> &Attributes
pub fn with_attributes(self, attributes: Attributes) -> Self
pub fn add_attributes(self, attributes: Attributes) -> Self
pub fn named(self, name: impl Into<String>) -> Self
pub fn via<Next, NextMat>( self, next: Flow<Out, Next, NextMat>, ) -> Flow<In, Next, Mat>
pub fn via_mat<Next, NextMat, Combined, F>( self, next: Flow<Out, Next, NextMat>, combine: F, ) -> Flow<In, Next, Combined>
pub fn via_mat_with<Next, NextMat, Combined, F>( self, next: Flow<Out, Next, NextMat>, combine: F, ) -> Flow<In, Next, Combined>
pub fn map<Next, F>(self, f: F) -> Flow<In, Next, Mat>
Sourcepub fn map_result<Next, F>(self, f: F) -> Flow<In, Next, Mat>
pub fn map_result<Next, F>(self, f: F) -> Flow<In, Next, Mat>
Fallible map. An error stops the stream, matching Datum’s existing
default supervision behavior.
Sourcepub fn map_result_with_supervision<Next, F>(
self,
f: F,
decider: SupervisionDecider,
) -> Flow<In, Next, Mat>
pub fn map_result_with_supervision<Next, F>( self, f: F, decider: SupervisionDecider, ) -> Flow<In, Next, Mat>
Fallible map with an Akka-style supervision decider.
Resume drops the failing element. Restart is equivalent to Resume
for stateless map.
pub fn filter<F>(self, predicate: F) -> Flow<In, Out, Mat>
pub fn filter_result<F>(self, predicate: F) -> Flow<In, Out, Mat>
pub fn filter_result_with_supervision<F>( self, predicate: F, decider: SupervisionDecider, ) -> Flow<In, Out, Mat>
pub fn filter_not<F>(self, predicate: F) -> Flow<In, Out, Mat>
pub fn filter_map<Next, F>(self, f: F) -> Flow<In, Next, Mat>
pub fn filter_map_result<Next, F>(self, f: F) -> Flow<In, Next, Mat>
pub fn filter_map_result_with_supervision<Next, F>( self, f: F, decider: SupervisionDecider, ) -> Flow<In, Next, Mat>
pub fn map_concat<Next, F, I>(self, f: F) -> Flow<In, Next, Mat>
pub fn map_concat_result<Next, F, I>(self, f: F) -> Flow<In, Next, Mat>where
Next: Send + 'static,
F: Fn(Out) -> StreamResult<I> + Send + Sync + 'static,
I: IntoIterator<Item = Next>,
I::IntoIter: Send + 'static,
pub fn map_concat_result_with_supervision<Next, F, I>(
self,
f: F,
decider: SupervisionDecider,
) -> Flow<In, Next, Mat>where
Next: Send + 'static,
F: Fn(Out) -> StreamResult<I> + Send + Sync + 'static,
I: IntoIterator<Item = Next>,
I::IntoIter: Send + 'static,
pub fn stateful_map<State, Next, F>( self, seed: State, f: F, ) -> Flow<In, Next, Mat>
pub fn stateful_map_result<State, Next, F>(
self,
seed: State,
f: F,
) -> Flow<In, Next, Mat>where
State: Clone + Send + Sync + 'static,
Next: Send + 'static,
F: Fn(&mut State, Out) -> StreamResult<Next> + Send + Sync + 'static,
pub fn stateful_map_result_with_supervision<State, Next, F>(
self,
seed: State,
f: F,
decider: SupervisionDecider,
) -> Flow<In, Next, Mat>where
State: Clone + Send + Sync + 'static,
Next: Send + 'static,
F: Fn(&mut State, Out) -> StreamResult<Next> + Send + Sync + 'static,
pub fn stateful_map_concat<State, Next, F, I>( self, seed: State, f: F, ) -> Flow<In, Next, Mat>
pub fn stateful_map_concat_result<State, Next, F, I>(
self,
seed: State,
f: F,
) -> Flow<In, Next, Mat>where
State: Clone + Send + Sync + 'static,
Next: Send + 'static,
F: Fn(&mut State, Out) -> StreamResult<I> + Send + Sync + 'static,
I: IntoIterator<Item = Next>,
I::IntoIter: Send + 'static,
pub fn stateful_map_concat_result_with_supervision<State, Next, F, I>(
self,
seed: State,
f: F,
decider: SupervisionDecider,
) -> Flow<In, Next, Mat>where
State: Clone + Send + Sync + 'static,
Next: Send + 'static,
F: Fn(&mut State, Out) -> StreamResult<I> + Send + Sync + 'static,
I: IntoIterator<Item = Next>,
I::IntoIter: Send + 'static,
Sourcepub fn map_async<Next, F, Fut>(
self,
parallelism: usize,
f: F,
) -> Flow<In, Next, Mat>
pub fn map_async<Next, F, Fut>( self, parallelism: usize, f: F, ) -> Flow<In, Next, Mat>
Polls each future once on the drain thread and moves only pending
futures onto the Tokio runtime. Contract-conforming futures behave
identically across that handoff; futures must not block inside poll.
Sourcepub fn map_async_with_supervision<Next, F, Fut>(
self,
parallelism: usize,
f: F,
decider: SupervisionDecider,
) -> Flow<In, Next, Mat>
pub fn map_async_with_supervision<Next, F, Fut>( self, parallelism: usize, f: F, decider: SupervisionDecider, ) -> Flow<In, Next, Mat>
Fallible map_async with an Akka-style supervision decider.
Resume and Restart drop the failed future result and keep the
ordered output sequence moving. Upstream errors are not supervised.
Sourcepub fn map_async_unordered<Next, F, Fut>(
self,
parallelism: usize,
f: F,
) -> Flow<In, Next, Mat>
pub fn map_async_unordered<Next, F, Fut>( self, parallelism: usize, f: F, ) -> Flow<In, Next, Mat>
Polls each future once on the drain thread and moves only pending
futures onto the Tokio runtime. Contract-conforming futures behave
identically across that handoff; futures must not block inside poll.
pub fn map_async_unordered_with_supervision<Next, F, Fut>( self, parallelism: usize, f: F, decider: SupervisionDecider, ) -> Flow<In, Next, Mat>
Sourcepub fn map_async_partitioned<Key, Next, Partition, F, Fut>(
self,
parallelism: usize,
per_partition: usize,
partition: Partition,
f: F,
) -> Flow<In, Next, Mat>
pub fn map_async_partitioned<Key, Next, Partition, F, Fut>( self, parallelism: usize, per_partition: usize, partition: Partition, f: F, ) -> Flow<In, Next, Mat>
Polls each future once on the drain thread and moves only pending
futures onto the Tokio runtime. Contract-conforming futures behave
identically across that handoff; futures must not block inside poll.