Skip to main content

atomr_streams/
lib.rs

1//! atomr-streams.
2//!
3//! Source/Flow/Sink DSL built on top of `futures::Stream`. The surface
4//! covers the linear operator set and the most common graph-DSL
5//! junctions from upstream:
6//!
7//! * [`Source`], [`Flow`], [`Sink`] — core linear elements.
8//! * [`GraphDsl`] / [`merge`], [`broadcast`], [`zip`], [`concat()`] junctions.
9//! * [`Framing`] — delimiter / length-field byte framing.
10//! * [`FileIO`], [`Tcp`] — I/O adapters.
11//! * [`KillSwitch`] — external termination.
12//! * [`RestartSource`] / [`RestartSettings`] — automatic resubscription.
13//! * [`SourceQueue`] / [`Sink::queue`] — explicit backpressure handles.
14//! * [`OverflowStrategy`] — bounded-buffer policies.
15//! * [`BidiFlow`] — bidirectional composition.
16//!
17//! The port delegates pipeline execution to `futures_util::StreamExt`; each
18//! combinator builds a boxed stream closure that mirrors the corresponding
19//! Operator.
20
21mod bidi;
22mod clock_gated;
23mod file_io;
24mod flow;
25mod framing;
26mod graph;
27mod hub;
28mod junction;
29mod kill_switch;
30mod lifecycle;
31mod materializer;
32mod overflow;
33mod queue;
34mod rate;
35mod recovery;
36mod restart;
37mod routing;
38mod runnable;
39mod sink;
40mod source;
41mod stream_ref;
42mod substream;
43mod supervision;
44mod tcp;
45mod timed;
46
47pub use bidi::BidiFlow;
48pub use clock_gated::{clock_gated, step_locked, AckSink, InstantToken};
49pub use file_io::FileIO;
50pub use flow::Flow;
51pub use framing::{Framing, FramingError};
52pub use graph::GraphDsl;
53pub use hub::{BroadcastHub, MergeHub};
54pub use junction::{
55    broadcast, concat, merge, merge_all, merge_prioritized, merge_sorted, zip, zip_with, zip_with_index,
56};
57pub use kill_switch::KillSwitch;
58pub use lifecycle::{count_elements, monitor, watch_termination};
59pub use materializer::ActorMaterializer;
60pub use overflow::OverflowStrategy;
61pub use queue::{QueueOfferResult, SourceQueue};
62pub use rate::{conflate, expand, respect_retry_after, token_bucket, token_bucket_keyed, RetryAfter};
63pub use recovery::{map_error, recover, recover_with, recover_with_retries, select_error};
64pub use restart::{RestartSettings, RestartSource};
65pub use routing::{balance, partition, unzip};
66pub use runnable::RunnableGraph;
67pub use sink::{Sink, SinkQueue};
68pub use source::Source;
69pub use stream_ref::{SinkRef, SinkRefHandle, SourceRef, SourceRefHandle};
70pub use substream::{group_by, prefix_and_tail, split_after, split_when};
71pub use supervision::{deciders, with_decider, Decider, SupervisionDirective};
72pub use tcp::{IncomingConnection, OutgoingConnection, Tcp};
73pub use timed::{grouped_within, idle_timeout, initial_delay, keep_alive};