pub struct HaltSignal { /* private fields */ }Expand description
A thread-safe halt signal the kernel registers with the writer.
The writer thread fires the callback once on the first unrecoverable condition;
the kernel polls HaltSignal::is_halted and converts it into a typed kernel
shutdown rather than letting the writer-thread error escape as a panic.
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
multiple submits race past the halt threshold) 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 Freeze for HaltSignal
impl RefUnwindSafe for HaltSignal
impl Send for HaltSignal
impl Sync for HaltSignal
impl Unpin for HaltSignal
impl UnsafeUnpin for HaltSignal
impl UnwindSafe for HaltSignal
Blanket Implementations§
impl<T> Allocation for T
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>
§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>
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