pub struct WorkflowRegistry { /* private fields */ }Expand description
Heterogeneous set of workflows keyed by WorkflowKey (spec §8.3).
Implementations§
Source§impl WorkflowRegistry
impl WorkflowRegistry
Sourcepub fn builder() -> WorkflowRegistryBuilder
pub fn builder() -> WorkflowRegistryBuilder
Starts a builder.
Sourcepub fn get(&self, key: &WorkflowKey) -> Option<&RegisteredWorkflow>
pub fn get(&self, key: &WorkflowKey) -> Option<&RegisteredWorkflow>
Looks a workflow up.
Sourcepub fn require(
&self,
key: &WorkflowKey,
) -> Result<&RegisteredWorkflow, ErasureError>
pub fn require( &self, key: &WorkflowKey, ) -> Result<&RegisteredWorkflow, ErasureError>
Looks a workflow up, failing when unknown.
Sourcepub fn check_version(
&self,
key: &WorkflowKey,
found: &WorkflowVersion,
) -> Result<(), ErasureError>
pub fn check_version( &self, key: &WorkflowKey, found: &WorkflowVersion, ) -> Result<(), ErasureError>
Checks that found is the registered version of key.
Sourcepub fn contains(&self, key: &WorkflowKey) -> bool
pub fn contains(&self, key: &WorkflowKey) -> bool
Returns true when the key is registered.
Sourcepub fn iter(&self) -> impl Iterator<Item = &RegisteredWorkflow>
pub fn iter(&self) -> impl Iterator<Item = &RegisteredWorkflow>
Iterates registrations in registration order.
Sourcepub fn keys(&self) -> impl Iterator<Item = &WorkflowKey>
pub fn keys(&self) -> impl Iterator<Item = &WorkflowKey>
Registered keys in registration order.
Sourcepub fn definitions(&self) -> WorkflowDefinitions
pub fn definitions(&self) -> WorkflowDefinitions
The definitions alone: everything pure, no executor of any kind.
Projection, the act catalog, act compilation, command policy, command validation and receipts are all here, and none of them reads or writes anything. A caller handed this cannot even load a case, which is the right shape for a path that is given the state instead.
Sourcepub fn read_only(&self) -> WorkflowReadRegistry
pub fn read_only(&self) -> WorkflowReadRegistry
The registry with the write half of every executor removed: the pure definitions plus the loading half of each executor.
This is what the plan-only turn path is built on. Nothing in the returned value can execute a batch, so a planning run cannot mutate a case however it is refactored.
Trait Implementations§
Source§impl Clone for WorkflowRegistry
impl Clone for WorkflowRegistry
Source§fn clone(&self) -> WorkflowRegistry
fn clone(&self) -> WorkflowRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more