#[non_exhaustive]pub enum AtomicityScope {
PerCommand,
PerCase,
ExplicitGroup {
group: String,
},
ExternalSaga {
saga: String,
},
}Expand description
How commands are grouped for all-or-nothing execution (spec §13.4).
New grouping strategies are expected, so downstream matches need a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PerCommand
Each command commits alone.
PerCase
All commands on the same case commit together (the default for mutations).
ExplicitGroup
A named group commits together.
ExternalSaga
The command starts an external saga tracked through the outbox.
Implementations§
Source§impl AtomicityScope
impl AtomicityScope
Sourcepub fn discriminant(&self) -> &'static str
pub fn discriminant(&self) -> &'static str
Stable snake-case name of the variant, as it appears in JSON.
Sourcepub fn group_name(&self) -> Option<&str>
pub fn group_name(&self) -> Option<&str>
The group or saga name, for the named scopes.
Trait Implementations§
Source§impl Clone for AtomicityScope
impl Clone for AtomicityScope
Source§impl Debug for AtomicityScope
impl Debug for AtomicityScope
Source§impl<'de> Deserialize<'de> for AtomicityScope
impl<'de> Deserialize<'de> for AtomicityScope
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
impl Eq for AtomicityScope
Source§impl Hash for AtomicityScope
impl Hash for AtomicityScope
Source§impl JsonSchema for AtomicityScope
impl JsonSchema for AtomicityScope
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AtomicityScope
impl PartialEq for AtomicityScope
Source§impl Serialize for AtomicityScope
impl Serialize for AtomicityScope
impl StructuralPartialEq for AtomicityScope
Auto Trait Implementations§
impl Freeze for AtomicityScope
impl RefUnwindSafe for AtomicityScope
impl Send for AtomicityScope
impl Sync for AtomicityScope
impl Unpin for AtomicityScope
impl UnsafeUnpin for AtomicityScope
impl UnwindSafe for AtomicityScope
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.