pub struct Source<T> { /* private fields */ }Implementations§
Source§impl<T: Send + 'static> Source<T>
impl<T: Send + 'static> Source<T>
pub fn from_iter<I: IntoIterator<Item = T> + Send + 'static>(iter: I) -> Self
pub fn single(value: T) -> Self
pub fn empty() -> Self
pub fn repeat(value: T) -> Selfwhere
T: Clone,
pub fn cycle<I: IntoIterator<Item = T> + Clone + Send + 'static>( iter: I, ) -> Self
pub fn from_future<F>(fut: F) -> Self
pub fn unfold<S, F, Fut>(init: S, f: F) -> Self
pub fn tick(initial_delay: Duration, interval: Duration, value: T) -> Selfwhere
T: Clone,
pub fn failed<E>(error: E) -> Source<Result<T, E>>where
E: Send + 'static,
pub fn from_receiver(rx: UnboundedReceiver<T>) -> Self
pub fn map<U, F>(self, f: F) -> Source<U>
Sourcepub fn map_async<U, F, Fut>(self, parallelism: usize, f: F) -> Source<U>
pub fn map_async<U, F, Fut>(self, parallelism: usize, f: F) -> Source<U>
akka.net: SelectAsync (ordered, bounded parallelism).
Sourcepub fn map_async_unordered<U, F, Fut>(
self,
parallelism: usize,
f: F,
) -> Source<U>
pub fn map_async_unordered<U, F, Fut>( self, parallelism: usize, f: F, ) -> Source<U>
akka.net: SelectAsyncUnordered.
Sourcepub fn async_boundary(self, buffer: usize) -> Source<T>
pub fn async_boundary(self, buffer: usize) -> Source<T>
async_boundary(buffer) — explicit async stage that decouples
the upstream and downstream pipelines onto separate Tokio
tasks via a bounded mpsc channel of capacity buffer.
Akka.NET / Akka Streams: the .async call. Phase 12.3 of
docs/full-port-plan.md.
Useful when an upstream stage is CPU-heavy and you want downstream consumption to overlap with production. Slow downstream applies natural back-pressure once the buffer fills.
pub fn filter<F>(self, f: F) -> Source<T>
pub fn filter_map<U, F>(self, f: F) -> Source<U>
pub fn take(self, n: usize) -> Source<T>
pub fn take_while<F>(self, f: F) -> Source<T>
pub fn skip(self, n: usize) -> Source<T>
pub fn skip_while<F>(self, f: F) -> Source<T>
pub fn scan<Acc, F>(self, init: Acc, f: F) -> Source<Acc>
Sourcepub fn grouped(self, n: usize) -> Source<Vec<T>>
pub fn grouped(self, n: usize) -> Source<Vec<T>>
akka.net: Grouped(n) — emit vectors of up to n items.
pub fn intersperse(self, sep: T) -> Source<T>where
T: Clone,
pub fn concat(self, other: Source<T>) -> Source<T>
pub fn prepend(self, other: Source<T>) -> Source<T>
Sourcepub fn initial_delay(self, d: Duration) -> Source<T>
pub fn initial_delay(self, d: Duration) -> Source<T>
akka.net: InitialDelay — wait d before emitting the first element.
Sourcepub fn throttle(self, interval: Duration) -> Source<T>
pub fn throttle(self, interval: Duration) -> Source<T>
akka.net: Throttle — limit element rate (one per interval).
Sourcepub fn buffer(self, size: usize, strategy: OverflowStrategy) -> Source<T>
pub fn buffer(self, size: usize, strategy: OverflowStrategy) -> Source<T>
akka.net: Buffer(size, OverflowStrategy).
Sourcepub fn wire_tap<F>(self, f: F) -> Source<T>
pub fn wire_tap<F>(self, f: F) -> Source<T>
akka.net: WireTap — observes each element without affecting the stream.