Skip to main content

Runner

Struct Runner 

Source
pub struct Runner<'a> {
    pub provider: &'a dyn Provider,
    pub shell: &'a dyn Shell,
    pub fs: &'a dyn Fs,
    pub context: &'a dyn ContextStrategy,
    pub root: PathBuf,
    pub budget: Budget,
    pub rollback: bool,
    pub on_event: Option<&'a dyn Fn(Event<'_>)>,
    pub research: bool,
    pub claim_check: bool,
    pub base_check: BaseCheck<'a>,
}

Fields§

§provider: &'a dyn Provider§shell: &'a dyn Shell§fs: &'a dyn Fs§context: &'a dyn ContextStrategy§root: PathBuf§budget: Budget§rollback: bool

Reset the tree to the checkpoint when the gate fails. Invariant III; default on.

§on_event: Option<&'a dyn Fn(Event<'_>)>

Called as the run proceeds. Default is silent.

§research: bool

Research run: periodically remind the model to keep report.md updated.

§claim_check: bool

Research runs: check report.md’s claims with the run’s model (claim_check).

§base_check: BaseCheck<'a>

How to check the verification gate against the untouched base tree.

Implementations§

Source§

impl<'a> Runner<'a>

Source

pub fn run(&self, state: &mut State) -> (Outcome, RunReport)

Source

pub fn run_with_clock( &self, state: &mut State, now: &(dyn Fn() -> Instant + Sync), ) -> (Outcome, RunReport)

Like run, reading the current time from now.

Source

pub fn run_with_clock_and_sleep( &self, state: &mut State, now: &(dyn Fn() -> Instant + Sync), sleep: &(dyn Fn(Duration) + Sync), ) -> (Outcome, RunReport)

Like run_with_clock, using sleep for retry waits.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Runner<'a>

§

impl<'a> !Send for Runner<'a>

§

impl<'a> !Sync for Runner<'a>

§

impl<'a> !UnwindSafe for Runner<'a>

§

impl<'a> Forget for Runner<'a>

§

impl<'a> Freeze for Runner<'a>
where &'a dyn Provider: Freeze, &'a dyn Shell: Freeze, &'a dyn Fs: Freeze, &'a dyn ContextStrategy: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, &'a dyn Fn(Event<'_>): Freeze, &'a dyn BaseCheckHandle: Freeze,

§

impl<'a> Move for Runner<'a>

§

impl<'a> Unpin for Runner<'a>
where &'a dyn Provider: Unpin, &'a dyn Shell: Unpin, &'a dyn Fs: Unpin, &'a dyn ContextStrategy: Unpin, *const u8 is !null: Unpin, &'a dyn Fn(Event<'_>): Unpin, &'a dyn BaseCheckHandle: Unpin,

§

impl<'a> UnsafeUnpin for Runner<'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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.