pub struct Correlator<A: Address, K, V, Route: DeliveryRoute<Protocol: Protocol<Addr = A, Msg = CorrelationResult<K, V>>>> { /* private fields */ }Expand description
Deterministic keyed request/result lifecycle behavior.
Each key is exactly pending, completed, or cancelled. Begin owns the
reply recipient. Resolve atomically marks a pending key completed and
emits one typed result; Cancel marks it cancelled and emits one typed
cancellation. Terminal keys are retained, making duplicate and stale input
explicit rather than indistinguishable from never-seen input. Reopening and
retention expiry require a separate explicit policy and are not inferred
from time or key reuse. Initialization is empty and the behavior does not
terminate itself. These lifecycle and retention choices are Bombay policy;
delivery remains an Address/Communication capability. No method has a
semantic panic condition.
Implementations§
Source§impl<A, K, V, Route> Correlator<A, K, V, Route>where
A: Address,
Route: DeliveryRoute<Protocol: Protocol<Addr = A, Msg = CorrelationResult<K, V>>>,
impl<A, K, V, Route> Correlator<A, K, V, Route>where
A: Address,
Route: DeliveryRoute<Protocol: Protocol<Addr = A, Msg = CorrelationResult<K, V>>>,
Sourcepub fn states(&self) -> &[CorrelationState<K, Route>]
pub fn states(&self) -> &[CorrelationState<K, Route>]
Borrow every retained lifecycle in first-begin order.