Expand description
Context-aware stream wrappers.
SourceWithContext and FlowWithContext are thin wrappers around regular pair
streams that keep an explicit context element adjacent to each data element.
The operator set mirrors Akka’s SourceWithContext / FlowWithContext: only
one-to-one operators are exposed by design so (data, context) alignment cannot be
broken by this API.
This is intentional. Reordering, arbitrarily dropping, or expanding to variable-length sequences can detach context from its intended element, which can silently break downstream sinks that rely on commit/trace/offset semantics. Keeping the API wrapper-centric preserves the one-to-one contract by construction while still enabling downstream composition.
Structs§
- Flow
With Context - A
Flowwhose input and output elements each carry an adjacent context value (mirrors Akka’sFlowWithContext). Exposes only context-preserving operators; convert viaFlowWithContext::as_flow. - Source
With Context - A
Sourcewhose elements each carry an adjacent context value (mirrors Akka’sSourceWithContext). Exposes only context-preserving operators; convert viaSourceWithContext::as_source.