pub struct InteractionRecord {
pub interaction: Interaction,
pub resolved_by_turn: Option<TurnId>,
pub resolution_event_ids: Vec<EventId>,
pub failure_code: Option<String>,
pub invalidation: Option<InvalidationRecord>,
}Expand description
A persisted interaction together with the store-owned resolution metadata that the core record does not carry.
Fields§
§interaction: InteractionThe interaction as the core sees it (payload, status, resolved option).
resolved_by_turn: Option<TurnId>Turn whose response began the resolution.
resolution_event_ids: Vec<EventId>Events that backed a Resolved outcome. A second click on a resolved
interaction is answered from these (spec §15.5).
failure_code: Option<String>Stable code of a Failed outcome.
invalidation: Option<InvalidationRecord>Why and when it was invalidated, when status is Invalidated.
Implementations§
Source§impl InteractionRecord
impl InteractionRecord
Sourcepub fn new(interaction: Interaction) -> Self
pub fn new(interaction: Interaction) -> Self
Wraps a freshly inserted interaction with empty metadata.
Sourcepub fn id(&self) -> InteractionId
pub fn id(&self) -> InteractionId
The interaction identifier.
Sourcepub fn status(&self) -> InteractionStatus
pub fn status(&self) -> InteractionStatus
The current status.
Trait Implementations§
Source§impl Clone for InteractionRecord
impl Clone for InteractionRecord
Source§impl Debug for InteractionRecord
impl Debug for InteractionRecord
Source§impl<'de> Deserialize<'de> for InteractionRecord
impl<'de> Deserialize<'de> for InteractionRecord
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 InteractionRecord
Source§impl PartialEq for InteractionRecord
impl PartialEq for InteractionRecord
Source§impl Serialize for InteractionRecord
impl Serialize for InteractionRecord
impl StructuralPartialEq for InteractionRecord
Auto Trait Implementations§
impl Freeze for InteractionRecord
impl RefUnwindSafe for InteractionRecord
impl Send for InteractionRecord
impl Sync for InteractionRecord
impl Unpin for InteractionRecord
impl UnsafeUnpin for InteractionRecord
impl UnwindSafe for InteractionRecord
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.