#[non_exhaustive]pub struct PersistedInteractions {
pub created: Vec<Interaction>,
pub invalidated: Vec<InteractionId>,
pub failed: Option<InteractionError>,
}Expand description
What InteractionEngine::persist managed to write.
failed is the whole point of the type. A caller that ignores it and
narrates “I have prepared the change below” is exactly the defect §15.5
forbids, so the outcome makes the failure impossible to overlook while still
handing back the cards that were written.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.created: Vec<Interaction>The cards now visible to the client, in specification order.
invalidated: Vec<InteractionId>Cards a replacing insert invalidated, in application order.
failed: Option<InteractionError>The first failure, when one specification could not be written.
Implementations§
Source§impl PersistedInteractions
impl PersistedInteractions
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true when every specification was written.
Sourcepub fn views(&self) -> Vec<InteractionView>
pub fn views(&self) -> Vec<InteractionView>
The cards, as the client-facing views a response block carries.
Trait Implementations§
Source§impl Clone for PersistedInteractions
impl Clone for PersistedInteractions
Source§impl Debug for PersistedInteractions
impl Debug for PersistedInteractions
Auto Trait Implementations§
impl Freeze for PersistedInteractions
impl RefUnwindSafe for PersistedInteractions
impl Send for PersistedInteractions
impl Sync for PersistedInteractions
impl Unpin for PersistedInteractions
impl UnsafeUnpin for PersistedInteractions
impl UnwindSafe for PersistedInteractions
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