pub struct ReflexEngine { /* private fields */ }Expand description
Registry-dispatching engine that consumes HealthReports and fires
matching reflex declarations when their epistemic threshold is met.
Implementations§
Source§impl ReflexEngine
impl ReflexEngine
pub fn new() -> Self
pub fn with_secret(trace_secret: Vec<u8>) -> Self
pub fn register(&mut self, reflex: IRReflex) -> Result<(), HandlerError>
Sourcepub fn dispatch(&mut self, report: &HealthReport) -> Vec<ReflexOutcome>
pub fn dispatch(&mut self, report: &HealthReport) -> Vec<ReflexOutcome>
Fire every registered reflex whose trigger == report.immune_name AND whose on_level is reached or exceeded by the report.
Sourcepub fn clear_idempotency(&mut self)
pub fn clear_idempotency(&mut self)
Reset idempotency set — used by tests.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReflexEngine
impl RefUnwindSafe for ReflexEngine
impl Send for ReflexEngine
impl Sync for ReflexEngine
impl Unpin for ReflexEngine
impl UnsafeUnpin for ReflexEngine
impl UnwindSafe for ReflexEngine
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.