1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// SPDX-License-Identifier: MIT OR Apache-2.0
// SPDX-FileCopyrightText: 2025-2026 ObzenFlow Contributors
// https://obzenflow.dev
// Core modules
pub
// Major subsystems
/// Convenience re-exports of the most commonly used runtime types.
///
/// The prelude gathers types that almost every flow definition or stage
/// implementation needs, grouped into five categories:
///
/// **Errors** — [`FlowError`](crate::errors::FlowError),
/// [`MessageBusError`](crate::errors::MessageBusError),
/// [`PipelineSupervisorError`](crate::errors::PipelineSupervisorError),
/// and the [`RuntimeResult`](crate::errors::RuntimeResult) type alias.
///
/// **Pipeline** —
/// [`PipelineBuilder`](crate::pipeline::PipelineBuilder) and
/// [`PipelineStageConfig`](crate::pipeline::PipelineStageConfig) for
/// constructing flows,
/// [`FlowHandle`](crate::pipeline::FlowHandle) for controlling a running
/// pipeline, and
/// [`PipelineState`](crate::pipeline::PipelineState) /
/// [`PipelineEvent`](crate::pipeline::PipelineEvent) /
/// [`PipelineAction`](crate::pipeline::PipelineAction) for observing
/// lifecycle transitions.
///
/// **Message bus** —
/// [`FsmMessageBus`](crate::message_bus::FsmMessageBus) (the inter-stage
/// transport) and
/// [`StageCommand`](crate::message_bus::StageCommand) (control signals
/// sent to individual stages).
///
/// **Handlers** — the user-facing handler traits:
/// [`FiniteSourceHandler`](crate::stages::FiniteSourceHandler),
/// [`InfiniteSourceHandler`](crate::stages::InfiniteSourceHandler),
/// [`TransformHandler`](crate::stages::TransformHandler),
/// [`SinkHandler`](crate::stages::SinkHandler),
/// [`StatefulHandler`](crate::stages::StatefulHandler),
/// [`ObserverHandler`](crate::stages::ObserverHandler), and the
/// [`ResourceManaged`](crate::stages::ResourceManaged) trait for stages
/// that own resources. Also includes
/// [`SourceError`](crate::stages::SourceError) for source-specific error
/// reporting.
///
/// **Metrics** —
/// [`DefaultMetricsConfig`](crate::metrics::DefaultMetricsConfig) for
/// configuring the built-in metrics subsystem.
///
/// **Event flow** —
/// [`UpstreamSubscription`](crate::messaging::UpstreamSubscription) for
/// wiring journal-based message delivery between stages.