#[non_exhaustive]pub enum KernelSignal {
Shutdown,
Suspend,
Resume,
Ping,
Pong,
ReloadConfig,
DumpState,
UserDefined(u8),
Kill,
LinkExit {
pid: Pid,
reason: ExitReason,
},
MonitorDown(ProcessDown),
ResourceWarning {
resource: String,
current: u64,
limit: u64,
},
}Expand description
Kernel control signals.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Shutdown
Request a process to shut down gracefully.
Suspend
Request a process to suspend.
Resume
Request a process to resume from suspension.
Ping
Heartbeat / keep-alive ping.
Pong
Response to a heartbeat ping.
ReloadConfig
Reload configuration (K2-G5).
DumpState
Dump internal state for debugging (K2-G5).
UserDefined(u8)
User-defined signal with a discriminant (K2-G5).
Kill
Immediate kill – no cleanup, no graceful shutdown (K2-G5).
LinkExit
Crash notification from a linked process (K1-G2).
MonitorDown(ProcessDown)
Monitor DOWN notification (K1-G2).
ResourceWarning
Resource usage warning at 80% of limit (K1-G3).
Trait Implementations§
Source§impl Clone for KernelSignal
impl Clone for KernelSignal
Source§fn clone(&self) -> KernelSignal
fn clone(&self) -> KernelSignal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KernelSignal
impl Debug for KernelSignal
Source§impl<'de> Deserialize<'de> for KernelSignal
impl<'de> Deserialize<'de> for KernelSignal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KernelSignal
impl RefUnwindSafe for KernelSignal
impl Send for KernelSignal
impl Sync for KernelSignal
impl Unpin for KernelSignal
impl UnsafeUnpin for KernelSignal
impl UnwindSafe for KernelSignal
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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