Skip to main content

HarnessRun

Struct HarnessRun 

Source
pub struct HarnessRun<'a> { /* private fields */ }
Expand description

A harness run between its opening and its freeze.

Implementations§

Source§

impl<'a> HarnessRun<'a>

Source

pub fn open( charter: Charter<'a>, ledger: &mut dyn Ledger, now: &mut dyn FnMut() -> Result<TimeMs, AxError>, ) -> Result<HarnessRun<'a>, AxError>

Writes the dispatch pair, as a model run’s dispatch does.

§Errors

Propagates the clock and the ledger.

Source

pub fn report( &self, ledger: &mut dyn Ledger, reported: &HarnessReported, t: TimeMs, ) -> Result<(), AxError>

Books one thing the harness reported, after it said it.

§Errors

Propagates a payload that will not encode and the ledger.

Source

pub fn cancel( &mut self, ledger: &mut dyn Ledger, cut: Cut, t: TimeMs, ) -> Result<(), AxError>

Books the cancel the city is about to send, the first time the turn is cut; a later cut writes nothing and the first one is the one the ending reads.

§Errors

Propagates the ledger.

Source

pub fn conclude( self, ledger: &mut dyn Ledger, conclusion: Conclusion<'_>, t: TimeMs, ) -> Result<Completion, AxError>

The harness answered: the tree, then the answer, then the freeze, and the completion the answer and the first cut decide.

§Errors

Propagates the ledger, and refuses a t at the end of u64.

Source

pub fn abandon( self, ledger: &mut dyn Ledger, handoff: &Handoff, t: TimeMs, ) -> Result<Completion, AxError>

The session ended with no answer: there is nothing to record as one, so the run freezes cancelled.

§Errors

Propagates the ledger, and refuses a t at the end of u64.

Auto Trait Implementations§

§

impl<'a> Freeze for HarnessRun<'a>

§

impl<'a> RefUnwindSafe for HarnessRun<'a>

§

impl<'a> Send for HarnessRun<'a>

§

impl<'a> Sync for HarnessRun<'a>

§

impl<'a> Unpin for HarnessRun<'a>

§

impl<'a> UnsafeUnpin for HarnessRun<'a>

§

impl<'a> UnwindSafe for HarnessRun<'a>

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.