Expand description
Streaming helpers for the caller-wraps architecture
These functions are used by the DynamicHub routing layer to wrap activation responses with metadata. Activations return typed domain events, and the caller uses these helpers to create PlexusStreamItems.
Functions§
- done_
stream - Create a done stream
- error_
stream - Create an error stream
- progress_
stream - Create a progress stream
- wrap_
one -> T: one data frame carryingitem, thendone.- wrap_
one_ result -> Result<T, E>: one data frame,{"ok": t}or{"err": e}, thendone.- wrap_
progress_ stream -> impl Stream<Item = Progress<T, P>>:Update(p)→ a progress frame carryingp;Item(t)→ a data frame carryingt. Thendone.- wrap_
result_ progress_ stream -> impl Stream<Item = Result<Progress<T, P>, E>>:Ok(Update(p))→ a progress frame;Ok(Item(t))→ a data frame{"ok": t};Err(e)→ a data frame{"err": e}. Thendone.- wrap_
result_ stream -> impl Stream<Item = Result<T, E>>: one data frame per item,{"ok": t}or{"err": e}; anErrdoes not end the stream. Thendone.- wrap_
stream - Wrap a typed stream into PlexusStream with automatic Done event
Type Aliases§
- Plexus
Stream - Type alias for boxed stream of PlexusStreamItem