#[non_exhaustive]pub struct SeededCase {
pub case_ref: CaseRef,
pub state: Option<Value>,
pub label: Option<String>,
pub open_interactions: Vec<Interaction>,
pub subject_only_when_named: bool,
}Expand description
A case handed to SeededTurnPlanner::plan instead of being loaded: the state a
recorded turn preceded, in the erased form the registry boundary uses.
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.case_ref: CaseRefThe case and the revision the state was read at.
state: Option<Value>The state, or None for a case that does not exist yet.
label: Option<String>The label the model sees; the case identifier when absent.
open_interactions: Vec<Interaction>Cards open on the case.
subject_only_when_named: boolWhether the case is in view only because the actor may reach it.
Implementations§
Source§impl SeededCase
impl SeededCase
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Sets the label.
Sourcepub const fn reachable_only(self) -> Self
pub const fn reachable_only(self) -> Self
Declares the case in view only because the actor may reach it.
Sourcepub fn with_open_interaction(self, interaction: Interaction) -> Self
pub fn with_open_interaction(self, interaction: Interaction) -> Self
Adds a card open on the case.
Trait Implementations§
Source§impl Clone for SeededCase
impl Clone for SeededCase
Source§impl Debug for SeededCase
impl Debug for SeededCase
impl Eq for SeededCase
Source§impl PartialEq for SeededCase
impl PartialEq for SeededCase
impl StructuralPartialEq for SeededCase
Auto Trait Implementations§
impl Freeze for SeededCase
impl RefUnwindSafe for SeededCase
impl Send for SeededCase
impl Sync for SeededCase
impl Unpin for SeededCase
impl UnsafeUnpin for SeededCase
impl UnwindSafe for SeededCase
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> 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.