Skip to main content

Crate atomr_streams

Crate atomr_streams 

Source
Expand description

atomr-streams. akka.net: src/core/Akka.Streams.

Source/Flow/Sink DSL built on top of futures::Stream. The surface covers the linear operator set and the most common graph-DSL junctions from upstream:

The port delegates pipeline execution to futures_util::StreamExt; each combinator builds a boxed stream closure that mirrors the corresponding Akka.Streams operator.

Modules§

deciders
Conventional decider helpers.

Structs§

ActorMaterializer
BidiFlow
BroadcastHub
Fan one source to many dynamic consumers.
FileIO
Flow
Framing
GraphDsl
IncomingConnection
KillSwitch
MergeHub
Fan many dynamic producers into one consumer source.
OutgoingConnection
RestartSettings
RestartSource
RunnableGraph
Sink
SinkQueue
SinkRefHandle
Consumer-side advertisement of a Sink<T>. The producer attaches a source via SinkRefHandle::attach which then pumps into the receiver-owned stream.
Source
SourceQueue
SourceRefHandle
Producer-side advertisement of a Source<T>. The owner pumps elements; consumers subscribe via SourceRefHandle::take_source.
Tcp

Enums§

FramingError
OverflowStrategy
QueueOfferResult
SupervisionDirective
What a Decider returns for an error.

Functions§

balance
balance(n) — round-robin one source into n outputs.
broadcast
akka.net: Broadcast(2) — cheap fan-out into two independent sources using cloned items and a bounded channel per downstream.
concat
akka.net: Concat<T> — drain first source fully, then second.
count_elements
count_elements(src) — convenience: returns the source unchanged plus an Arc<AtomicU64> that totals every element.
group_by
group_by(max_substreams, key_fn) — fan one source into N per-key substreams. Each new key yields a (key, Source<T>) pair on the returned outer source. Once max_substreams keys are open, additional keys’ elements are dropped.
grouped_within
grouped_within(n, dur) — emit Vec<T> chunks of up to n elements; flush early when dur elapses since the chunk’s first element. Akka.NET: Source.GroupedWithin(n, dur).
idle_timeout
idle_timeout(d) — complete the stream early if no element arrives for d. Akka.NET’s variant raises a typed exception; we surface “completed early” so a downstream recover_with / Sink::collect_with_status can disambiguate.
map_error
Map the error variant via f. Both Ok and Err continue downstream; only the Err payload type changes.
merge
akka.net: Merge<T> (interleaving, order not guaranteed).
merge_all
akka.net: Merge(sources) with arbitrary fan-in.
monitor
monitor(src, on_each) — invoke on_each(&item) for every element flowing through, without consuming or transforming it. Useful for telemetry instrumentation.
partition
partition(n, f) — fan one source into n output sources; each element is sent to the output picked by f(item). Out-of-range outputs are dropped.
recover
Replace any Err(e) with f(e) and continue, mapping the stream to T (success values are unwrapped). The first error stops the upstream — subsequent elements are dropped.
recover_with
Replace the upstream’s tail with replacement upon the first Err(_). Pre-error Ok(_) values flow through unchanged.
split_when
split_when(pred) — split the source into a sequence of substreams; a new substream begins when pred(item) returns true, with the splitting element going to the new substream.
unzip
unzip(src) — split a source of (A, B) pairs into two sources. The second is buffered if the first lags (no backpressure across the split — matches akka.net’s fan-out semantics).
watch_termination
watch_termination(src) returns the original source plus a oneshot::Receiver<()> that fires when upstream completes (whether by exhaustion or by the receiver being polled past the final element).
with_decider
Apply decider to each error in src, emitting only the surviving Ok payloads.
zip
akka.net: Zip — pair corresponding elements.
zip_with
akka.net: ZipWith — pair corresponding elements and apply f.
zip_with_index
akka.net: ZipWithIndex.

Type Aliases§

Decider
A decider is a closure mapping &E → SupervisionDirective.
SinkRef
SourceRef