#[non_exhaustive]pub struct CascadeOutcome {
pub resolved: usize,
pub cascaded_children: usize,
pub synchronous: bool,
}Expand description
Typed outcome of
crate::engine_backend::EngineBackend::cascade_completion.
Observable result of cascading a terminal-execution completion into
its downstream edges. Counters are best-effort — they describe what
the backend actually did on this call, not an authoritative graph
state (the dependency_reconciler remains the correctness safety
net for both backends).
§Timing semantics
The two in-tree backends differ in when cascade work is observable to the caller. This is an accepted architectural divergence; consumer code that needs synchronous cascade either targets Valkey explicitly or inspects Postgres’s observability surface (outbox drain) to verify.
- Valkey (
synchronous = true): the FCALL cascade runs inline — whencascade_completionreturns, every directly resolvable edge has been advanced and everychild_skippedtransitive descendant has been recursively cascaded up to theMAX_CASCADE_DEPTHcap.resolved+cascaded_childrenreflect the full subtree walked on this invocation. - Postgres (
synchronous = false): the call enqueues a dispatch against theff_completion_eventoutbox row; actual downstreamff_edge_groupadvancement is performed byff_backend_postgres::dispatch::dispatch_completionin per-hop transactions.resolvedis the number of edge groups advanced during this invocation’s outbox drain;cascaded_childrenis always0(PG does not self-recurse — further hops go through their own outbox events emitted by the completing transaction).
#[non_exhaustive] so additional counters (e.g. an explicit
dispatched_event_id for PG, or a depth_reached for Valkey) can
be added without breaking consumers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resolved: usizeEdges whose resolution observably advanced on this call.
cascaded_children: usizeTransitive descendants cascaded synchronously (Valkey only;
always 0 on Postgres — see Timing semantics).
synchronous: booltrue when the caller observed the cascade inline (Valkey);
false when the call only enqueued dispatch (Postgres outbox).
Implementations§
Source§impl CascadeOutcome
impl CascadeOutcome
Sourcepub fn synchronous(resolved: usize, cascaded_children: usize) -> Self
pub fn synchronous(resolved: usize, cascaded_children: usize) -> Self
Construct an outcome describing a synchronous (Valkey) cascade.
Sourcepub fn async_dispatched(advanced: usize) -> Self
pub fn async_dispatched(advanced: usize) -> Self
Construct an outcome describing an async (Postgres outbox)
dispatch. advanced is the per-call outbox-drain count.
Trait Implementations§
Source§impl Clone for CascadeOutcome
impl Clone for CascadeOutcome
Source§fn clone(&self) -> CascadeOutcome
fn clone(&self) -> CascadeOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more