pub struct HarnessRun<'a> { /* private fields */ }Expand description
A harness run between its opening and its freeze.
Implementations§
Source§impl<'a> HarnessRun<'a>
impl<'a> HarnessRun<'a>
Sourcepub fn open(
charter: Charter<'a>,
ledger: &mut dyn Ledger,
now: &mut dyn FnMut() -> Result<TimeMs, AxError>,
) -> Result<HarnessRun<'a>, AxError>
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.
Sourcepub fn report(
&self,
ledger: &mut dyn Ledger,
reported: &HarnessReported,
t: TimeMs,
) -> Result<(), AxError>
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.
Sourcepub fn cancel(
&mut self,
ledger: &mut dyn Ledger,
cut: Cut,
t: TimeMs,
) -> Result<(), AxError>
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.
Sourcepub fn conclude(
self,
ledger: &mut dyn Ledger,
conclusion: Conclusion<'_>,
t: TimeMs,
) -> Result<Completion, AxError>
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.
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> 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