Skip to main content

TurnSummary

Struct TurnSummary 

Source
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

Source

pub fn new() -> Self

An empty summary, for a turn on which a side did nothing at all.

Source

pub fn with_case(self, case: CaseKey) -> Self

Adds a case this side addressed.

Source

pub fn with_act(self, act: ActSummary) -> Self

Adds an act this side extracted.

Source

pub fn with_mutation(self, mutation: MutationSummary) -> Self

Adds a mutation this side would run.

Source

pub fn with_clarification(self, clarification: ClarificationSummary) -> Self

Adds a question this side asked before running anything.

Source

pub fn with_claim(self, class: ClaimClass) -> Self

Adds an outcome class this side stated.

Source

pub fn with_evidenced_claim(self, class: ClaimClass) -> Self

Adds an outcome class an event of this side backs.

Source

pub fn with_refusal(self, refusal: RefusedMutation) -> Self

Adds a mutation this side understood and did not perform.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TurnSummary

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TurnSummary

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for TurnSummary

Source§

impl PartialEq for TurnSummary

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TurnSummary

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more