pub enum InteractionStatus {
Active,
Resolving,
Resolved,
Declined,
Dismissed,
Invalidated,
Expired,
Failed,
}Expand description
Lifecycle status of an interaction (spec §15.4).
Deliberately exhaustive: the set is a closed state machine with an
ALL table and a
can_transition rule for every pair, so code that
handles statuses must be forced by the compiler to consider all of them.
Variants§
Active
Displayed and answerable.
Resolving
An answer was accepted and its commands are executing.
Resolved
The associated commands committed.
Declined
The user declined.
Dismissed
The user dismissed it without answering.
Invalidated
The case moved on; the card is no longer valid.
Expired
The deadline passed.
Failed
The associated commands failed.
Implementations§
Source§impl InteractionStatus
impl InteractionStatus
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Returns true for statuses with no outgoing transition.
Sourcepub fn is_open(self) -> bool
pub fn is_open(self) -> bool
Returns true while the interaction still occupies the “one blocking
interaction per case” slot (I5).
Sourcepub fn can_transition(from: Self, to: Self) -> bool
pub fn can_transition(from: Self, to: Self) -> bool
The interaction state machine (spec §15.5).
Activemay move to any other status.Resolvingmay move toResolved,Failed, or back toActivewhen policy restores the card after a failed command.- Every other status is terminal.
Trait Implementations§
Source§impl Clone for InteractionStatus
impl Clone for InteractionStatus
impl Copy for InteractionStatus
Source§impl Debug for InteractionStatus
impl Debug for InteractionStatus
Source§impl<'de> Deserialize<'de> for InteractionStatus
impl<'de> Deserialize<'de> for InteractionStatus
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 InteractionStatus
Source§impl Hash for InteractionStatus
impl Hash for InteractionStatus
Source§impl JsonSchema for InteractionStatus
impl JsonSchema for InteractionStatus
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 Ord for InteractionStatus
impl Ord for InteractionStatus
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for InteractionStatus
impl PartialEq for InteractionStatus
Source§impl PartialOrd for InteractionStatus
impl PartialOrd for InteractionStatus
Source§impl Serialize for InteractionStatus
impl Serialize for InteractionStatus
impl StructuralPartialEq for InteractionStatus
Auto Trait Implementations§
impl Freeze for InteractionStatus
impl RefUnwindSafe for InteractionStatus
impl Send for InteractionStatus
impl Sync for InteractionStatus
impl Unpin for InteractionStatus
impl UnsafeUnpin for InteractionStatus
impl UnwindSafe for InteractionStatus
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.