pub struct SwfData {
pub account_id: String,
pub region: String,
pub domains: BTreeMap<String, Domain>,
pub activity_types: BTreeMap<String, TypeRecord>,
pub workflow_types: BTreeMap<String, TypeRecord>,
pub executions: BTreeMap<String, Execution>,
pub decision_tokens: BTreeMap<String, String>,
pub activity_tokens: BTreeMap<String, ActivityRef>,
pub tags: BTreeMap<String, BTreeMap<String, String>>,
}Expand description
Per-account Amazon SWF state.
Fields§
§account_id: String§region: String§domains: BTreeMap<String, Domain>Domains keyed by name.
activity_types: BTreeMap<String, TypeRecord>Activity types keyed by "{domain}\u{1}{name}\u{1}{version}".
workflow_types: BTreeMap<String, TypeRecord>Workflow types keyed by "{domain}\u{1}{name}\u{1}{version}".
executions: BTreeMap<String, Execution>Workflow executions keyed by runId.
decision_tokens: BTreeMap<String, String>Decision task token -> owning runId.
activity_tokens: BTreeMap<String, ActivityRef>Activity task token -> (runId, activityId).
Resource tags keyed by domain ARN.
Implementations§
Source§impl SwfData
impl SwfData
Sourcepub fn type_map_key(domain: &str, name: &str, version: &str) -> String
pub fn type_map_key(domain: &str, name: &str, version: &str) -> String
Composite key for a type record within a domain.
Sourcepub fn find_execution<'a>(
&'a self,
workflow_id: &str,
run_id: Option<&str>,
) -> Option<&'a Execution>
pub fn find_execution<'a>( &'a self, workflow_id: &str, run_id: Option<&str>, ) -> Option<&'a Execution>
Find the currently-open execution for a workflow_id (SWF allows only
one open execution per workflow id at a time), preferring an exact
run_id when supplied.
pub fn find_execution_mut<'a>( &'a mut self, workflow_id: &str, run_id: Option<&str>, ) -> Option<&'a mut Execution>
Trait Implementations§
Source§impl AccountState for SwfData
impl AccountState for SwfData
Source§fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
Create a fresh, empty state for the given account.
Source§fn inherit_from(&mut self, _sibling: &Self)
fn inherit_from(&mut self, _sibling: &Self)
Called after a new account state is created via
MultiAccountState::get_or_create,
with a reference to an existing sibling state. Services can override
this to propagate shared resources (e.g. body caches) to the new state.Source§impl<'de> Deserialize<'de> for SwfData
impl<'de> Deserialize<'de> for SwfData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SwfData
impl RefUnwindSafe for SwfData
impl Send for SwfData
impl Sync for SwfData
impl Unpin for SwfData
impl UnsafeUnpin for SwfData
impl UnwindSafe for SwfData
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
Mutably borrows from an owned value. Read more