Skip to main content

LinearizedExecutor

Struct LinearizedExecutor 

Source
pub struct LinearizedExecutor<M>{ /* private fields */ }
Expand description

Transition-linearized execution with separately ordered output dispatch.

Implementations§

Source§

impl<M> LinearizedExecutor<M>

Source

pub fn new(machine: M) -> Self

Construct an executor with an empty output queue.

Source

pub fn submit(&self, input: M::Input) -> <M::Output as OutputEvidence>::Evidence

Advance and enqueue one output at the same linearization point.

§Panics

Panics after synchronization poison or a transition panic that consumed the affine machine state.

Source

pub fn evidence(&self) -> Option<<M::Output as OutputEvidence>::Evidence>

Clone the evidence installed by the latest linearized transition.

§Panics

Panics if executor synchronization was poisoned.

Source

pub fn dispatch_pending<H>(&self, handler: &H) -> DispatchOutcome
where H: OutputHandler<M::Output>,

Dispatch queued outputs until empty, or contribute them to another owner.

DispatchOutcome::OwnedElsewhere means another caller owns dispatch and this call is fire-and-forget; it does not mean the caller’s output completed. If a handler panics, its owned output is dropped exactly once and a later call resumes with the remaining queue.

§Panics

Panics if executor synchronization was poisoned by a transition panic in LinearizedExecutor::submit.

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<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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.