Skip to main content

Module context

Module context 

Source
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§

FlowWithContext
SourceWithContext