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 file_io;
23mod flow;
24mod framing;
25mod graph;
26mod hub;
27mod junction;
28mod kill_switch;
29mod lifecycle;
30mod materializer;
31mod overflow;
32mod queue;
33mod rate;
34mod recovery;
35mod restart;
36mod routing;
37mod runnable;
38mod sink;
39mod source;
40mod stream_ref;
41mod substream;
42mod supervision;
43mod tcp;
44mod timed;
45
46pub use bidi::BidiFlow;
47pub use file_io::FileIO;
48pub use flow::Flow;
49pub use framing::{Framing, FramingError};
50pub use graph::GraphDsl;
51pub use hub::{BroadcastHub, MergeHub};
52pub use junction::{
53    broadcast, concat, merge, merge_all, merge_prioritized, merge_sorted, zip, zip_with, zip_with_index,
54};
55pub use kill_switch::KillSwitch;
56pub use lifecycle::{count_elements, monitor, watch_termination};
57pub use materializer::ActorMaterializer;
58pub use overflow::OverflowStrategy;
59pub use queue::{QueueOfferResult, SourceQueue};
60pub use rate::{conflate, expand};
61pub use recovery::{map_error, recover, recover_with, recover_with_retries, select_error};
62pub use restart::{RestartSettings, RestartSource};
63pub use routing::{balance, partition, unzip};
64pub use runnable::RunnableGraph;
65pub use sink::{Sink, SinkQueue};
66pub use source::Source;
67pub use stream_ref::{SinkRef, SinkRefHandle, SourceRef, SourceRefHandle};
68pub use substream::{group_by, prefix_and_tail, split_after, split_when};
69pub use supervision::{deciders, with_decider, Decider, SupervisionDirective};
70pub use tcp::{IncomingConnection, OutgoingConnection, Tcp};
71pub use timed::{grouped_within, idle_timeout, initial_delay, keep_alive};