pub enum NotifyState<'a> {
}
Expand description
Daemon notification for the service manager.
Variants§
Ready
Service startup is finished.
Reloading
Service is reloading its configuration.
On systemd v253 and newer, this message MUST be followed by a
NotifyState::MonotonicUsec
notification, or the reload will fail
and the service will be terminated.
Stopping
Service is stopping.
Status(&'a str)
Free-form status message for the service manager.
Errno(u32)
Service has failed with an errno
-style error code, e.g. 2
for ENOENT
.
BusError(&'a str)
Service has failed with a D-Bus-style error code, e.g. org.freedesktop.DBus.Error.TimedOut
.
MainPid(u32)
Main process ID (PID) of the service, in case it wasn’t started directly by the service manager.
Watchdog
Tells the service manager to update the watchdog timestamp.
WatchdogTrigger
Tells the service manager to trigger a watchdog failure.
WatchdogUsec(u32)
Resets the configured watchdog value.
ExtendTimeoutUsec(u32)
Tells the service manager to extend the service timeout.
MonotonicUsec(i128)
Notify systemd of the current monotonic time in microseconds.
You can construct this value by calling NotifyState::monotonic_usec_now()
.
Custom(&'a str)
Custom state.
Implementations§
Source§impl NotifyState<'_>
impl NotifyState<'_>
Sourcepub fn monotonic_usec_now() -> Result<Self>
pub fn monotonic_usec_now() -> Result<Self>
Create a new NotifyState::MonotonicUsec
using the current system monotonic time.
§Example
let _ = NotifyState::monotonic_usec_now().expect("Failed to read monotonic time");
Trait Implementations§
Source§impl<'a> Clone for NotifyState<'a>
impl<'a> Clone for NotifyState<'a>
Source§fn clone(&self) -> NotifyState<'a>
fn clone(&self) -> NotifyState<'a>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more