pub enum SagaAction {
IssueCmd {
target: PipeTarget,
cmd: Command,
},
Done,
Failed {
reason: String,
},
Wait,
}Expand description
What a saga decides to do next, returned from start /
on_event. The coordinator drives the saga forward by reacting
to this enum.
F.7 cleanup audit: IssueCmd, Done, Wait are all constructed
by F.5 + F.6 sagas. Failed is consumed in apply_action (and
its corresponding emit_failed is now actively called by the
evict-and-replace path), but no shipped saga constructs
Failed yet — sagas today only succeed or wait. Variant-level
allow scopes the dead-code suppression precisely to that one
reserved variant.
Variants§
IssueCmd
Dispatch a command on the target pipe; saga remains in flight.
Done
Saga succeeded. Coordinator removes it from in_flight
and emits Event::SagaCompleted.
Failed
Saga failed irrecoverably. Coordinator emits Event::SagaFailed
after dispatching any compensation IssueCmds the saga issued
before returning Failed. Reserved for sagas with explicit
failure conditions (e.g. cross-process dispatch follow-up
- saga timeouts).
Wait
Saga is waiting for an event it hasn’t seen yet. No-op for the coordinator until the next bus event.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SagaAction
impl RefUnwindSafe for SagaAction
impl Send for SagaAction
impl Sync for SagaAction
impl Unpin for SagaAction
impl UnsafeUnpin for SagaAction
impl UnwindSafe for SagaAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.