pub struct HaltSignal { /* private fields */ }Expand description
A thread-safe halt signal the kernel registers with the writer.
Each fail-stop source fires the shared callback at most once: the submitting thread on a backpressure stall, the writer thread on a backend failure, and the capture adapter on a rejected submit. The signal records the first reason for supervision; no runtime component polls it to stop the trader.
Implementations§
Source§impl HaltSignal
impl HaltSignal
Sourcepub fn callback(&self) -> HaltCallback
pub fn callback(&self) -> HaltCallback
Returns the HaltCallback the writer fires when an unrecoverable condition
occurs.
The callback records the HaltReason (preserving only the first one when
the writer and the capture adapter both signal) and then flips the halted
flag, so a poller that observes is_halted() never reads back an empty
reason.
Sourcepub fn reason(&self) -> Option<HaltReason>
pub fn reason(&self) -> Option<HaltReason>
Returns the HaltReason recorded on the first fail-stop, if any.
Calling this does not clear the signal; the kernel’s halted flag remains set so subsequent submits surface as fail-stopped.
Trait Implementations§
Source§impl Clone for HaltSignal
impl Clone for HaltSignal
Source§fn clone(&self) -> HaltSignal
fn clone(&self) -> HaltSignal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HaltSignal
impl Debug for HaltSignal
Auto Trait Implementations§
impl !RefUnwindSafe for HaltSignal
impl !UnwindSafe for HaltSignal
impl Freeze for HaltSignal
impl Send for HaltSignal
impl Sync for HaltSignal
impl Unpin for HaltSignal
impl UnsafeUnpin for HaltSignal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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