pub struct ReconcileLoop<'p, H: Handler> { /* private fields */ }Expand description
Executes tick() / run() against a Handler to close the belief-evidence gap.
Implementations§
Source§impl<'p, H: Handler> ReconcileLoop<'p, H>
impl<'p, H: Handler> ReconcileLoop<'p, H>
pub fn new( ir_reconcile: IRReconcile, program: &IRProgram, handler: H, ) -> Result<Self, HandlerError>
pub fn with_shield( ir_reconcile: IRReconcile, program: &IRProgram, handler: H, shield: ShieldApprove, ) -> Result<Self, HandlerError>
Sourcepub fn tick(&mut self) -> Result<ReconcileTickReport, HandlerError>
pub fn tick(&mut self) -> Result<ReconcileTickReport, HandlerError>
One control-loop tick. Returns the report capturing all gating decisions and any emitted HandlerOutcome.
Sourcepub fn run(
&mut self,
max_ticks: Option<u32>,
) -> Result<Vec<ReconcileTickReport>, HandlerError>
pub fn run( &mut self, max_ticks: Option<u32>, ) -> Result<Vec<ReconcileTickReport>, HandlerError>
Tick until quiescence (two consecutive noops), budget exhaustion,
or the supplied max_ticks (default = max_retries + 2).
pub fn history(&self) -> &[ReconcileTickReport]
Auto Trait Implementations§
impl<'p, H> !RefUnwindSafe for ReconcileLoop<'p, H>
impl<'p, H> !Send for ReconcileLoop<'p, H>
impl<'p, H> !Sync for ReconcileLoop<'p, H>
impl<'p, H> !UnwindSafe for ReconcileLoop<'p, H>
impl<'p, H> Freeze for ReconcileLoop<'p, H>where
H: Freeze,
impl<'p, H> Unpin for ReconcileLoop<'p, H>where
H: Unpin,
impl<'p, H> UnsafeUnpin for ReconcileLoop<'p, H>where
H: UnsafeUnpin,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.