Skip to main content

Source

Struct Source 

Source
pub struct Source<Out, Mat = NotUsed> { /* private fields */ }

Implementations§

Source§

impl<T: Send + 'static> Source<T, NotUsed>

Source

pub fn queue_bounded(capacity: usize) -> Source<T, BoundedSourceQueue<T>>

Source

pub fn queue( capacity: usize, strategy: OverflowStrategy, ) -> Source<T, SourceQueue<T>>

Source§

impl<Out: Send + 'static, Mat: Send + 'static> Source<Out, Mat>

Source

pub fn buffer(self, size: usize, strategy: OverflowStrategy) -> Self

Source

pub fn conflate_with_seed<Agg, Seed, Aggregate>( self, seed: Seed, aggregate: Aggregate, ) -> Source<Agg, Mat>
where Agg: Send + 'static, Seed: Fn(Out) -> Agg + Send + Sync + 'static, Aggregate: Fn(Agg, Out) -> Agg + Send + Sync + 'static,

Source

pub fn conflate( self, aggregate: impl Fn(Out, Out) -> Out + Send + Sync + 'static, ) -> Self

Source

pub fn batch<Agg, Seed, Aggregate>( self, max: u64, seed: Seed, aggregate: Aggregate, ) -> Source<Agg, Mat>
where Agg: Send + 'static, Seed: Fn(Out) -> Agg + Send + Sync + 'static, Aggregate: Fn(Agg, Out) -> Agg + Send + Sync + 'static,

Source

pub fn batch_weighted<Agg, Cost, Seed, Aggregate>( self, max: u64, cost_fn: Cost, seed: Seed, aggregate: Aggregate, ) -> Source<Agg, Mat>
where Agg: Send + 'static, Cost: Fn(&Out) -> u64 + Send + Sync + 'static, Seed: Fn(Out) -> Agg + Send + Sync + 'static, Aggregate: Fn(Agg, Out) -> Agg + Send + Sync + 'static,

Source

pub fn expand<Next, Expand, Iter>(self, expand: Expand) -> Source<Next, Mat>
where Next: Send + 'static, Expand: Fn(Out) -> Iter + Send + Sync + 'static, Iter: Iterator<Item = Next> + Send + 'static,

Source

pub fn extrapolate<Expand, Iter>( self, extrapolator: Expand, initial: Option<Out>, ) -> Self
where Out: Clone + Sync, Expand: Fn(Out) -> Iter + Send + Sync + 'static, Iter: Iterator<Item = Out> + Send + 'static,

Source

pub fn aggregate_with_boundary<Agg, Emit, Allocate, Aggregate, Harvest>( self, allocate: Allocate, aggregate: Aggregate, harvest: Harvest, emit_on_timer: Option<AggregateTimer<Agg>>, ) -> Source<Emit, Mat>
where Agg: Send + 'static, Emit: Send + 'static, Allocate: Fn() -> Agg + Send + Sync + 'static, Aggregate: Fn(Agg, Out) -> (Agg, bool) + Send + Sync + 'static, Harvest: Fn(Agg) -> Emit + Send + Sync + 'static,

Source

pub fn detach(self) -> Self

Source§

impl<Out: Send + 'static> Source<Out, NotUsed>

Source

pub fn empty() -> Self

Source

pub fn never() -> Self

Source

pub fn failed(error: StreamError) -> Self

Source

pub fn future<F, Fut>(future: F) -> Self
where F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Out>> + Send + 'static,

Source

pub fn future_source<F, Fut>(future: F) -> Self
where F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Source<Out>>> + Send + 'static,

Source

pub fn cycle<F, I>(factory: F) -> Self
where F: Fn() -> I + Send + Sync + 'static, I: IntoIterator<Item = Out>, I::IntoIter: Send + 'static,

Source

pub fn unfold<State, F>(initial: State, f: F) -> Self
where State: Clone + Send + Sync + 'static, F: Fn(State) -> Option<(State, Out)> + Send + Sync + 'static,

Source

pub fn unfold_async<State, F, Fut>(initial: State, f: F) -> Self
where State: Clone + Send + Sync + 'static, F: Fn(State) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Option<(State, Out)>>> + Send + 'static,

Source

pub fn unfold_resource<Resource, Create, Read, Close>( create: Create, read: Read, close: Close, ) -> Self
where Resource: Send + 'static, Create: Fn() -> StreamResult<Resource> + Send + Sync + 'static, Read: Fn(&mut Resource) -> StreamResult<Option<Out>> + Send + Sync + 'static, Close: Fn(Resource) -> StreamResult<()> + Send + Sync + 'static,

Source

pub fn unfold_resource_async<Resource, Create, CreateFut, Read, ReadFut, Close, CloseFut>( create: Create, read: Read, close: Close, ) -> Self
where Resource: Send + 'static, Create: Fn() -> CreateFut + Send + Sync + 'static, CreateFut: Future<Output = StreamResult<Resource>> + Send + 'static, Read: Fn(&mut Resource) -> ReadFut + Send + Sync + 'static, ReadFut: Future<Output = StreamResult<Option<Out>>> + Send + 'static, Close: Fn(Resource) -> CloseFut + Send + Sync + 'static, CloseFut: Future<Output = StreamResult<()>> + Send + 'static,

Source

pub fn lazy_single<F>(create: F) -> Self
where F: Fn() -> Out + Send + Sync + 'static,

Source

pub fn lazy_future<F, Fut>(create: F) -> Self
where F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Out>> + Send + 'static,

Source

pub fn lazy_source<InnerMat, F>( create: F, ) -> Source<Out, StreamCompletion<InnerMat>>
where InnerMat: Send + 'static, F: Fn() -> Source<Out, InnerMat> + Send + Sync + 'static,

Source

pub fn lazy_future_source<InnerMat, F, Fut>( create: F, ) -> Source<Out, StreamCompletion<InnerMat>>
where InnerMat: Send + 'static, F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Source<Out, InnerMat>>> + Send + 'static,

Source

pub fn from_fn_iter<F, I>(factory: F) -> Self
where F: Fn() -> I + Send + Sync + 'static, I: IntoIterator<Item = Out>, I::IntoIter: Send + 'static,

Source§

impl<Out: Send + 'static, Mat: Send + 'static> Source<Out, Mat>

Source

pub fn as_source_with_context<Ctx, F>( self, extract_context: F, ) -> SourceWithContext<Out, Ctx, Mat>
where Ctx: Send + 'static, F: Fn(&Out) -> Ctx + Send + Sync + 'static,

Source

pub fn via<Next, FlowMat>( self, flow: Flow<Out, Next, FlowMat>, ) -> Source<Next, Mat>
where Next: Send + 'static, FlowMat: Send + 'static,

Source

pub fn via_mat<Next, FlowMat, Combined, F>( self, flow: Flow<Out, Next, FlowMat>, combine: F, ) -> Source<Next, Combined>
where Next: Send + 'static, FlowMat: Send + 'static, Combined: Send + 'static, F: Fn(Mat, FlowMat) -> Combined + Send + Sync + 'static,

Source

pub fn via_mat_with<Next, FlowMat, Combined, F>( self, flow: Flow<Out, Next, FlowMat>, combine: F, ) -> Source<Next, Combined>
where Next: Send + 'static, FlowMat: Send + 'static, Combined: Send + 'static, F: Fn(Mat, FlowMat) -> Combined + Send + Sync + 'static,

Source

pub fn map<Next, F>(self, f: F) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> Next + Send + Sync + 'static,

Source

pub fn attributes(&self) -> &Attributes

Source

pub fn with_attributes(self, attributes: Attributes) -> Self

Source

pub fn add_attributes(self, attributes: Attributes) -> Self

Source

pub fn named(self, name: impl Into<String>) -> Self

Source

pub fn async_boundary(self) -> Self

Insert an async boundary after this source.

The boundary uses the same crate::AsyncBoundaryExecutionConfig defaults as the GraphDSL AsyncBoundary runner and hands elements across a bounded Ractor-backed queue. async_boundary is the Rust-friendly primary name; Source::r#async is provided as the Akka-mirroring alias.

Source

pub fn async(self) -> Self

Akka-mirroring alias for Source::async_boundary.

Source

pub fn async_boundary_with_config( self, config: AsyncBoundaryExecutionConfig, ) -> Self

Insert an async boundary with an explicit bounded handoff configuration.

config.buffer_size controls the number of elements that may be queued between the upstream and downstream fused regions. A zero buffer is rejected when the stream is materialized.

Source

pub fn async_boundary_with_buffer(self, buffer_size: usize) -> Self

Insert an async boundary with a custom bounded handoff size.

Source

pub fn map_result<Next, F>(self, f: F) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> StreamResult<Next> + Send + Sync + 'static,

Source

pub fn map_result_with_supervision<Next, F>( self, f: F, decider: SupervisionDecider, ) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> StreamResult<Next> + Send + Sync + 'static,

Source

pub fn filter<F>(self, predicate: F) -> Source<Out, Mat>
where F: Fn(&Out) -> bool + Send + Sync + 'static,

Source

pub fn filter_result<F>(self, predicate: F) -> Source<Out, Mat>
where F: Fn(&Out) -> StreamResult<bool> + Send + Sync + 'static,

Source

pub fn filter_result_with_supervision<F>( self, predicate: F, decider: SupervisionDecider, ) -> Source<Out, Mat>
where F: Fn(&Out) -> StreamResult<bool> + Send + Sync + 'static,

Source

pub fn filter_not<F>(self, predicate: F) -> Source<Out, Mat>
where F: Fn(&Out) -> bool + Send + Sync + 'static,

Source

pub fn filter_map<Next, F>(self, f: F) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> Option<Next> + Send + Sync + 'static,

Source

pub fn filter_map_result<Next, F>(self, f: F) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> StreamResult<Option<Next>> + Send + Sync + 'static,

Source

pub fn filter_map_result_with_supervision<Next, F>( self, f: F, decider: SupervisionDecider, ) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> StreamResult<Option<Next>> + Send + Sync + 'static,

Source

pub fn map_concat<Next, F, I>(self, f: F) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> I + Send + Sync + 'static, I: IntoIterator<Item = Next>, I::IntoIter: Send + 'static,

Source

pub fn map_concat_result<Next, F, I>(self, f: F) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> StreamResult<I> + Send + Sync + 'static, I: IntoIterator<Item = Next>, I::IntoIter: Send + 'static,

Source

pub fn map_concat_result_with_supervision<Next, F, I>( self, f: F, decider: SupervisionDecider, ) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> StreamResult<I> + Send + Sync + 'static, I: IntoIterator<Item = Next>, I::IntoIter: Send + 'static,

Source

pub fn stateful_map<State, Next, F>( self, seed: State, f: F, ) -> Source<Next, Mat>
where State: Clone + Send + Sync + 'static, Next: Send + 'static, F: Fn(&mut State, Out) -> Next + Send + Sync + 'static,

Source

pub fn stateful_map_result<State, Next, F>( self, seed: State, f: F, ) -> Source<Next, Mat>
where State: Clone + Send + Sync + 'static, Next: Send + 'static, F: Fn(&mut State, Out) -> StreamResult<Next> + Send + Sync + 'static,

Source

pub fn stateful_map_result_with_supervision<State, Next, F>( self, seed: State, f: F, decider: SupervisionDecider, ) -> Source<Next, Mat>
where State: Clone + Send + Sync + 'static, Next: Send + 'static, F: Fn(&mut State, Out) -> StreamResult<Next> + Send + Sync + 'static,

Source

pub fn stateful_map_concat<State, Next, F, I>( self, seed: State, f: F, ) -> Source<Next, Mat>
where State: Clone + Send + Sync + 'static, Next: Send + 'static, F: Fn(&mut State, Out) -> I + Send + Sync + 'static, I: IntoIterator<Item = Next>, I::IntoIter: Send + 'static,

Source

pub fn stateful_map_concat_result<State, Next, F, I>( self, seed: State, f: F, ) -> Source<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,

Source

pub fn stateful_map_concat_result_with_supervision<State, Next, F, I>( self, seed: State, f: F, decider: SupervisionDecider, ) -> Source<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,

Source

pub fn map_async<Next, F, Fut>( self, parallelism: usize, f: F, ) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Next>> + Send + 'static,

Source

pub fn map_async_with_supervision<Next, F, Fut>( self, parallelism: usize, f: F, decider: SupervisionDecider, ) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Next>> + Send + 'static,

Source

pub fn map_async_unordered<Next, F, Fut>( self, parallelism: usize, f: F, ) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Next>> + Send + 'static,

Source

pub fn map_async_unordered_with_supervision<Next, F, Fut>( self, parallelism: usize, f: F, decider: SupervisionDecider, ) -> Source<Next, Mat>
where Next: Send + 'static, F: Fn(Out) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Next>> + Send + 'static,

Source

pub fn map_async_partitioned<Key, Next, Partition, F, Fut>( self, parallelism: usize, per_partition: usize, partition: Partition, f: F, ) -> Source<Next, Mat>
where Key: Clone + Eq + Hash + Send + 'static, Next: Send + 'static, Partition: Fn(&Out) -> Key + Send + Sync + 'static, F: Fn(Out) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Next>> + Send + 'static,

Source

pub fn prefix_and_tail(self, n: usize) -> Source<(Vec<Out>, Source<Out>), Mat>

Source

pub fn flat_map_prefix<Next, FlowMat, F>( self, n: usize, f: F, ) -> Source<Next, Mat>
where Next: Send + 'static, FlowMat: Send + 'static, F: Fn(Vec<Out>) -> Flow<Out, Next, FlowMat> + Send + Sync + 'static, Out: Clone,

Source

pub fn group_by<Key, F>( self, max_substreams: usize, f: F, allow_closed_substream_recreation: bool, ) -> Source<Source<Out>, Mat>
where Key: Clone + Eq + Hash + Send + 'static, F: Fn(&Out) -> Key + Send + Sync + 'static, Out: Clone,

Source

pub fn split_when<F>(self, predicate: F) -> Source<Source<Out>, Mat>
where F: Fn(&Out) -> bool + Send + Sync + 'static, Out: Clone,

Source

pub fn split_after<F>(self, predicate: F) -> Source<Source<Out>, Mat>
where F: Fn(&Out) -> bool + Send + Sync + 'static, Out: Clone,

Source

pub fn flat_map_concat<Next, NextMat, F>(self, f: F) -> Source<Next, Mat>
where Next: Send + 'static, NextMat: Send + 'static, F: Fn(Out) -> Source<Next, NextMat> + Send + Sync + 'static,

Source

pub fn flat_map_merge<Next, NextMat, F>( self, breadth: usize, f: F, ) -> Source<Next, Mat>
where Next: Send + 'static, NextMat: Send + 'static, F: Fn(Out) -> Source<Next, NextMat> + Send + Sync + 'static,

Source

pub fn take(self, n: usize) -> Source<Out, Mat>

Source

pub fn drop(self, n: usize) -> Source<Out, Mat>

Source

pub fn take_while<F>(self, predicate: F) -> Source<Out, Mat>
where F: Fn(&Out) -> bool + Send + Sync + 'static,

Source

pub fn drop_while<F>(self, predicate: F) -> Source<Out, Mat>
where F: Fn(&Out) -> bool + Send + Sync + 'static,

Source

pub fn limit(self, max: u64) -> Source<Out, Mat>

Source

pub fn grouped(self, size: usize) -> Source<Vec<Out>, Mat>

Source

pub fn scan<State, F>(self, seed: State, f: F) -> Source<State, Mat>
where State: Clone + Send + Sync + 'static, F: Fn(State, Out) -> State + Send + Sync + 'static,

Source

pub fn scan_async<State, F, Fut>(self, seed: State, f: F) -> Source<State, Mat>
where State: Clone + Send + Sync + 'static, F: Fn(State, Out) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<State>> + Send + 'static,

Source

pub fn scan_result<State, F>(self, seed: State, f: F) -> Source<State, Mat>
where State: Clone + Send + Sync + 'static, F: Fn(State, Out) -> StreamResult<State> + Send + Sync + 'static,

Source

pub fn scan_result_with_supervision<State, F>( self, seed: State, f: F, decider: SupervisionDecider, ) -> Source<State, Mat>
where State: Clone + Send + Sync + 'static, F: Fn(State, Out) -> StreamResult<State> + Send + Sync + 'static,

Source

pub fn sliding(self, size: usize, step: usize) -> Source<Vec<Out>, Mat>
where Out: Clone,

Source

pub fn fold<Acc, F>(self, zero: Acc, f: F) -> Source<Acc, Mat>
where Acc: Clone + Send + Sync + 'static, F: Fn(Acc, Out) -> Acc + Send + Sync + 'static,

Source

pub fn fold_async<Acc, F, Fut>(self, zero: Acc, f: F) -> Source<Acc, Mat>
where Acc: Clone + Send + Sync + 'static, F: Fn(Acc, Out) -> Fut + Send + Sync + 'static, Fut: Future<Output = StreamResult<Acc>> + Send + 'static,

Source

pub fn map_with_resource<Resource, Next, Create, F, Close>( self, create: Create, f: F, close: Close, ) -> Source<Next, Mat>
where Resource: Send + 'static, Next: Send + 'static, Create: Fn() -> StreamResult<Resource> + Send + Sync + 'static, F: Fn(&mut Resource, Out) -> StreamResult<Next> + Send + Sync + 'static, Close: Fn(Resource) -> StreamResult<Option<Next>> + Send + Sync + 'static,

Source

pub fn fold_result<Acc, F>(self, zero: Acc, f: F) -> Source<Acc, Mat>
where Acc: Clone + Send + Sync + 'static, F: Fn(Acc, Out) -> StreamResult<Acc> + Send + Sync + 'static,

Source

pub fn fold_result_with_supervision<Acc, F>( self, zero: Acc, f: F, decider: SupervisionDecider, ) -> Source<Acc, Mat>
where Acc: Clone + Send + Sync + 'static, F: Fn(Acc, Out) -> StreamResult<Acc> + Send + Sync + 'static,

Source

pub fn reduce<F>(self, f: F) -> Source<Out, Mat>
where F: Fn(Out, Out) -> Out + Send + Sync + 'static,

Source

pub fn reduce_result<F>(self, f: F) -> Source<Out, Mat>
where Out: Clone, F: Fn(Out, Out) -> StreamResult<Out> + Send + Sync + 'static,

Source

pub fn reduce_result_with_supervision<F>( self, f: F, decider: SupervisionDecider, ) -> Source<Out, Mat>
where Out: Clone, F: Fn(Out, Out) -> StreamResult<Out> + Send + Sync + 'static,

Source

pub fn map_error<F>(self, f: F) -> Source<Out, Mat>
where F: Fn(StreamError) -> StreamError + Send + Sync + 'static,

Source

pub fn recover<F>(self, f: F) -> Source<Out, Mat>
where F: Fn(StreamError) -> Option<Out> + Send + Sync + 'static,

Source

pub fn recover_with<F>(self, f: F) -> Source<Out, Mat>
where F: Fn(StreamError) -> Option<Source<Out>> + Send + Sync + 'static,

Source

pub fn recover_with_retries<F>(self, retries: usize, f: F) -> Source<Out, Mat>
where F: Fn(StreamError) -> Option<Source<Out>> + Send + Sync + 'static,

Source

pub fn on_error_complete(self) -> Source<Out, Mat>

Source

pub fn concat<Mat2>(self, that: Source<Out, Mat2>) -> Source<Out, Mat>
where Mat2: Send + 'static,

Source

pub fn concat_lazy<Mat2>(self, that: Source<Out, Mat2>) -> Source<Out, Mat>
where Mat2: Send + 'static,

Source

pub fn concat_all_lazy<Mat2, I>(self, those: I) -> Source<Out, Mat>
where Mat2: Send + 'static, I: IntoIterator<Item = Source<Out, Mat2>>,

Source

pub fn prepend<Mat2>(self, that: Source<Out, Mat2>) -> Source<Out, Mat>
where Mat2: Send + 'static,

Source

pub fn prepend_lazy<Mat2>(self, that: Source<Out, Mat2>) -> Source<Out, Mat>
where Mat2: Send + 'static,

Source

pub fn or_else<Mat2>(self, secondary: Source<Out, Mat2>) -> Source<Out, Mat>
where Mat2: Send + 'static,

Source

pub fn interleave<Mat2>( self, that: Source<Out, Mat2>, segment_size: usize, ) -> Source<Out, Mat>
where Mat2: Send + 'static,

Source

pub fn interleave_all<Mat2, I>( self, those: I, segment_size: usize, eager_close: bool, ) -> Source<Out, Mat>
where Mat2: Send + 'static, I: IntoIterator<Item = Source<Out, Mat2>>,

Source

pub fn merge_sorted<Mat2>(self, that: Source<Out, Mat2>) -> Source<Out, Mat>
where Out: Ord, Mat2: Send + 'static,

Source

pub fn merge_latest<Mat2>( self, that: Source<Out, Mat2>, eager_complete: bool, ) -> Source<Vec<Out>, Mat>
where Out: Clone, Mat2: Send + 'static,

Source

pub fn merge_all<Mat2, I>( self, those: I, eager_complete: bool, ) -> Source<Out, Mat>
where Mat2: Send + 'static, I: IntoIterator<Item = Source<Out, Mat2>>,

Source

pub fn zip_with<Mat2, Out2, Next, F>( self, that: Source<Out2, Mat2>, combine: F, ) -> Source<Next, Mat>
where Out2: Send + 'static, Next: Send + 'static, Mat2: Send + 'static, F: Fn(Out, Out2) -> Next + Send + Sync + 'static,

Source

pub fn zip_latest<Mat2, Out2>( self, that: Source<Out2, Mat2>, ) -> Source<(Out, Out2), Mat>
where Out: Clone, Out2: Clone + Send + 'static, Mat2: Send + 'static,

Source

pub fn zip_latest_with<Mat2, Out2, Next, F>( self, that: Source<Out2, Mat2>, eager_complete: bool, combine: F, ) -> Source<Next, Mat>
where Out: Clone, Out2: Clone + Send + 'static, Next: Send + 'static, Mat2: Send + 'static, F: Fn(Out, Out2) -> Next + Send + Sync + 'static,

Source

pub fn zip_with_index(self) -> Source<(Out, u64), Mat>

Source

pub fn zip_all<Mat2, Out2>( self, that: Source<Out2, Mat2>, this_elem: Out, that_elem: Out2, ) -> Source<(Out, Out2), Mat>
where Out: Clone + Sync, Out2: Clone + Send + Sync + 'static, Mat2: Send + 'static,

Source

pub fn also_to<SinkMat>(self, sink: Sink<Out, SinkMat>) -> Source<Out, Mat>
where Out: Clone, SinkMat: Send + 'static,

Source

pub fn also_to_all<SinkMat, I>(self, sinks: I) -> Source<Out, Mat>
where Out: Clone, SinkMat: Send + 'static, I: IntoIterator<Item = Sink<Out, SinkMat>>,

Source

pub fn divert_to<SinkMat, F>( self, sink: Sink<Out, SinkMat>, predicate: F, ) -> Source<Out, Mat>
where SinkMat: Send + 'static, F: Fn(&Out) -> bool + Send + Sync + 'static,

Source

pub fn wire_tap<SinkMat>(self, sink: Sink<Out, SinkMat>) -> Source<Out, Mat>
where Out: Clone, SinkMat: Send + 'static,

Source

pub fn run_with<SinkMat: Send + 'static>( self, sink: Sink<Out, SinkMat>, ) -> StreamResult<SinkMat>

Source

pub fn run_with_materializer<SinkMat: Send + 'static>( self, sink: Sink<Out, SinkMat>, materializer: &Materializer, ) -> StreamResult<SinkMat>

Source

pub fn to<SinkMat>(self, sink: Sink<Out, SinkMat>) -> RunnableGraph<Mat>
where SinkMat: Send + 'static,

Source

pub fn to_mat<SinkMat, Combined, F>( self, sink: Sink<Out, SinkMat>, combine: F, ) -> RunnableGraph<Combined>
where SinkMat: Send + 'static, Combined: Send + 'static, F: Fn(Mat, SinkMat) -> Combined + Send + Sync + 'static,

Source

pub fn run_collect(self) -> StreamResult<Vec<Out>>

Source

pub fn map_materialized_value<NextMat, F>(self, f: F) -> Source<Out, NextMat>
where NextMat: Send + 'static, F: Fn(Mat) -> NextMat + Send + Sync + 'static,

Source§

impl<Out: Clone + Send + Sync + 'static> Source<Out, NotUsed>

Source

pub fn combine<Mat1, Mat2, MatRest, I>( first: Source<Out, Mat1>, second: Source<Out, Mat2>, rest: I, strategy: SourceCombineStrategy, ) -> Source<Out, NotUsed>
where Mat1: Send + 'static, Mat2: Send + 'static, MatRest: Send + 'static, I: IntoIterator<Item = Source<Out, MatRest>>,

Source

pub fn zip_n<Mat2, I>(sources: I) -> Source<Vec<Out>, NotUsed>
where I: IntoIterator<Item = Source<Out, Mat2>>, Mat2: Send + 'static, Out: Clone,

Source

pub fn zip_with_n<Mat2, I, Next, F>( sources: I, zipper: F, ) -> Source<Next, NotUsed>
where I: IntoIterator<Item = Source<Out, Mat2>>, Mat2: Send + 'static, Next: Send + 'static, F: Fn(Vec<Out>) -> Next + Send + Sync + 'static,

Source

pub fn merge_prioritized_n<Mat2, I>( sources_and_priorities: I, eager_complete: bool, ) -> Source<Out, NotUsed>
where I: IntoIterator<Item = (Source<Out, Mat2>, usize)>, Mat2: Send + 'static,

Source

pub fn maybe() -> (MaybeHandle<Out>, Self)

Source

pub fn single(item: Out) -> Self

Source

pub fn repeat(item: Out) -> Self

Source

pub fn from_iterable<I>(items: I) -> Self
where I: IntoIterator<Item = Out>,

Source§

impl<Out: Send + 'static, Mat: Send + 'static> Source<Out, Mat>

Source

pub fn throttle( self, elements: u64, per: Duration, maximum_burst: i32, mode: ThrottleMode, ) -> Self

Source

pub fn throttle_with_cost<CostFn>( self, cost: u64, per: Duration, maximum_burst: i32, cost_fn: CostFn, mode: ThrottleMode, ) -> Self
where CostFn: Fn(&Out) -> u64 + Send + Sync + 'static,

Source

pub fn delay(self, delay: Duration, strategy: DelayOverflowStrategy) -> Self

Source

pub fn delay_with<Supplier, Strategy>( self, delay_strategy_supplier: Supplier, overflow_strategy: DelayOverflowStrategy, ) -> Self
where Supplier: Fn() -> Strategy + Send + Sync + 'static, Strategy: FnMut(&Out) -> Duration + Send + 'static,

Source

pub fn initial_delay(self, delay: Duration) -> Self

Source

pub fn grouped_within( self, max_number: usize, interval: Duration, ) -> Source<Vec<Out>, Mat>

Source

pub fn grouped_weighted_within<CostFn>( self, max_weight: u64, interval: Duration, cost_fn: CostFn, ) -> Source<Vec<Out>, Mat>
where CostFn: Fn(&Out) -> u64 + Send + Sync + 'static,

Source

pub fn drop_within(self, timeout: Duration) -> Self

Source

pub fn take_within(self, timeout: Duration) -> Self

Source

pub fn idle_timeout(self, timeout: Duration) -> Self

Source

pub fn backpressure_timeout(self, timeout: Duration) -> Self

Source

pub fn completion_timeout(self, timeout: Duration) -> Self

Source

pub fn initial_timeout(self, timeout: Duration) -> Self

Source

pub fn keep_alive<Inject>(self, timeout: Duration, inject: Inject) -> Self
where Inject: Fn() -> Out + Send + Sync + 'static,

Source§

impl<Out: Clone + Send + Sync + 'static> Source<Out, Cancellable>

Source

pub fn tick(initial_delay: Duration, interval: Duration, element: Out) -> Self

Trait Implementations§

Source§

impl<Out: Clone, Mat: Clone> Clone for Source<Out, Mat>

Source§

fn clone(&self) -> Source<Out, Mat>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Out: Clone + Send + Sync + 'static> FromIterator<Out> for Source<Out, NotUsed>

Source§

fn from_iter<T: IntoIterator<Item = Out>>(iter: T) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

§

impl<Out, Mat = NotUsed> !RefUnwindSafe for Source<Out, Mat>

§

impl<Out, Mat = NotUsed> !UnwindSafe for Source<Out, Mat>

§

impl<Out, Mat> Freeze for Source<Out, Mat>

§

impl<Out, Mat> Send for Source<Out, Mat>

§

impl<Out, Mat> Sync for Source<Out, Mat>

§

impl<Out, Mat> Unpin for Source<Out, Mat>

§

impl<Out, Mat> UnsafeUnpin for Source<Out, Mat>

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> Message for T
where T: Any + Send + 'static,

Source§

fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>

Convert a BoxedMessage to this concrete type
Source§

fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>

Convert this message to a BoxedMessage
Source§

impl<T> OutputMessage for T
where T: Message + Clone,

Source§

impl<T> State for T
where T: Any + Send + 'static,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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