pub struct TurnSummary {
pub cases: Vec<CaseKey>,
pub acts: Vec<ActSummary>,
pub mutations: Vec<MutationSummary>,
pub clarifications: Vec<ClarificationSummary>,
pub claims: Vec<ClaimClass>,
pub evidenced_claims: Vec<ClaimClass>,
pub refusals: Vec<RefusedMutation>,
}Expand description
One side’s account of a turn.
Build the Turnframe side with
PlannedTurn::summary. Build the
other side by hand, from whatever the existing path logs — which is why this
struct is deliberately not #[non_exhaustive]: an adopter has to be able
to construct one. Prefer the with_* methods, or struct-update syntax over
TurnSummary::new, so a later field arrives as a default rather than as a
compile error.
Fields§
§cases: Vec<CaseKey>The cases this side addressed, in the order it considered them.
acts: Vec<ActSummary>The acts it extracted from the turn.
mutations: Vec<MutationSummary>The mutations it would run.
clarifications: Vec<ClarificationSummary>The questions it asked before running anything.
claims: Vec<ClaimClass>The outcome classes it stated, or would have been entitled to state.
evidenced_claims: Vec<ClaimClass>The outcome classes an event of this side actually backs. Empty for a planned turn, which by construction committed nothing.
refusals: Vec<RefusedMutation>The mutations it understood and did not perform.
Implementations§
Source§impl TurnSummary
impl TurnSummary
Sourcepub fn with_act(self, act: ActSummary) -> Self
pub fn with_act(self, act: ActSummary) -> Self
Adds an act this side extracted.
Sourcepub fn with_mutation(self, mutation: MutationSummary) -> Self
pub fn with_mutation(self, mutation: MutationSummary) -> Self
Adds a mutation this side would run.
Sourcepub fn with_clarification(self, clarification: ClarificationSummary) -> Self
pub fn with_clarification(self, clarification: ClarificationSummary) -> Self
Adds a question this side asked before running anything.
Sourcepub fn with_claim(self, class: ClaimClass) -> Self
pub fn with_claim(self, class: ClaimClass) -> Self
Adds an outcome class this side stated.
Sourcepub fn with_evidenced_claim(self, class: ClaimClass) -> Self
pub fn with_evidenced_claim(self, class: ClaimClass) -> Self
Adds an outcome class an event of this side backs.
Sourcepub fn with_refusal(self, refusal: RefusedMutation) -> Self
pub fn with_refusal(self, refusal: RefusedMutation) -> Self
Adds a mutation this side understood and did not perform.
Sourcepub fn from_planned(planned: &PlannedTurn) -> Self
pub fn from_planned(planned: &PlannedTurn) -> Self
This library’s side of the comparison, read off a planned turn.
evidenced_claims is empty and stays empty: planning commits nothing,
so there is no event to cite. claims carries
PlannedTurn::would_claim,
which is an upper bound.
Trait Implementations§
Source§impl Clone for TurnSummary
impl Clone for TurnSummary
Source§impl Debug for TurnSummary
impl Debug for TurnSummary
Source§impl Default for TurnSummary
impl Default for TurnSummary
impl Eq for TurnSummary
Source§impl PartialEq for TurnSummary
impl PartialEq for TurnSummary
impl StructuralPartialEq for TurnSummary
Auto Trait Implementations§
impl Freeze for TurnSummary
impl RefUnwindSafe for TurnSummary
impl Send for TurnSummary
impl Sync for TurnSummary
impl Unpin for TurnSummary
impl UnsafeUnpin for TurnSummary
impl UnwindSafe for TurnSummary
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
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
key and return true if they are equal.