pub struct PhaseStopEvaluator { /* private fields */ }Expand description
A cadence-feed callback that drives a PulseEvaluator against a
running phase and terminally stops it on the first verdict. See the
module docs.
Implementations§
Source§impl PhaseStopEvaluator
impl PhaseStopEvaluator
Sourcepub fn new(eval: Box<dyn PulseEvaluator>, stop_flag: Arc<AtomicBool>) -> Self
pub fn new(eval: Box<dyn PulseEvaluator>, stop_flag: Arc<AtomicBool>) -> Self
Build an evaluator over the phase’s stop_flag (raised
cooperatively when the evaluator yields a terminal disposition).
Sourcepub fn outcome_cell(&self) -> StopOutcomeCell
pub fn outcome_cell(&self) -> StopOutcomeCell
The cell the executor reads at phase completion for the terminal
disposition. Shared (cloned Arc) so the executor holds a handle
while the evaluator runs on the cadence-feed worker.
Trait Implementations§
Source§impl Reporter for PhaseStopEvaluator
impl Reporter for PhaseStopEvaluator
fn report(&mut self, window: &MetricSet)
Source§fn finished(&self) -> bool
fn finished(&self) -> bool
Self-termination signal. After a
report
that leaves this true, the subscriber’s cadence-feed dispatch
worker exits its loop (calling flush on the
way out) — the subscriber receives no further pulses. A one-shot
subscriber — e.g. a settle / stop evaluator that has set a
terminal phase disposition — uses this to unregister itself
without a self-join deadlock (it runs on the worker thread, so it
cannot call unsubscribe on itself directly). Default false
(a long-lived subscriber that never self-terminates).fn flush(&mut self)
Auto Trait Implementations§
impl !RefUnwindSafe for PhaseStopEvaluator
impl !Sync for PhaseStopEvaluator
impl !UnwindSafe for PhaseStopEvaluator
impl Forget for PhaseStopEvaluator
impl Freeze for PhaseStopEvaluatorwhere
*const dyn PulseEvaluator is !null: Freeze,
PhantomData<dyn PulseEvaluator>: Freeze,
*const ArcInner<Atomic<bool>> is !null: Freeze,
PhantomData<ArcInner<Atomic<bool>>>: Freeze,
*const ArcInner<ArcSwapAny<Arc<Option<Outcome>>>> is !null: Freeze,
PhantomData<ArcInner<ArcSwapAny<Arc<Option<Outcome>>>>>: Freeze,
impl Move for PhaseStopEvaluator
impl Send for PhaseStopEvaluator
impl Unpin for PhaseStopEvaluator
impl UnsafeUnpin for PhaseStopEvaluatorwhere
*const dyn PulseEvaluator is !null: UnsafeUnpin,
PhantomData<dyn PulseEvaluator>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const ArcInner<ArcSwapAny<Arc<Option<Outcome>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<ArcSwapAny<Arc<Option<Outcome>>>>>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more