pub trait SagaType: Debug + 'static {
type ExecContextType: Debug + Send + Sync + 'static;
}
Expand description
Collection of consumer-provided types, effectively defining the type signature of a saga
This trait bundles a bunch of consumer-provided types that are used throughout Steno to avoid a sprawl of type parameters and duplicated trait bounds.
Required Associated Types§
sourcetype ExecContextType: Debug + Send + Sync + 'static
type ExecContextType: Debug + Send + Sync + 'static
Type for the consumer’s context object
When beginning execution of a saga with
crate::SecClient::saga_create()
or resuming a previous execution
with crate::SecClient::saga_resume()
, consumers provide a
context object with this type. This object is not persistent.
Rather, it provides programming interfaces the consumer wants
available from within actions. For example, this could include HTTP
clients that will be used by the action to make requests to
dependent services. This object is made available to actions via
crate::ActionContext::user_data()
. There’s one context for the
life of each saga’s execution.