Enum JobMode
#[non_exhaustive]pub enum JobMode {
Fail,
Lenient,
Replace,
ReplaceIrreversibly,
Isolate,
Flush,
IgnoreDependencies,
IgnoreRequirements,
Triggering,
RestartDependencies,
Other(String),
}Expand description
How a job request treats queued jobs and dependencies.
This is the mode argument of StartUnit and similar methods. The
OnSuccessJobMode and OnFailureJobMode properties of units use it too.
JobMode::Isolate and JobMode::RestartDependencies are valid for
start requests only. JobMode::Triggering is valid for stop requests
only.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Fail
Fail if the request would reverse a queued job on a weak dependency (a queued start job becomes a stop job).
Lenient
Fail if the request conflicts with any active or activating unit.
Added in systemd 258.
Replace
Replace queued jobs that conflict with the request. This is the usual choice.
ReplaceIrreversibly
Like replace, and mark the new jobs as irreversible.
Later conflicting transactions can’t replace such jobs and can’t be
queued while the jobs are pending. An explicit cancel still removes
them. Upstream recommends it for transactions that pull in
shutdown.target.
Isolate
Start the unit and stop all units that are not its dependencies. Valid for start requests only.
Flush
Cancel all queued jobs when the new job is queued.
IgnoreDependencies
Ignore all dependencies of the unit and run the job at once. No required units are pulled in and no ordering is honored. Upstream advises against it.
IgnoreRequirements
Ignore only the requirement dependencies and still honor the ordering. Upstream advises against it.
Triggering
Stop the unit and the active units that trigger it. Valid for stop requests only.
RestartDependencies
Propagate a restart to the dependencies of the unit, as if a restart job existed for it. Valid for start requests only.
Added in systemd 254.
Other(String)
A value that this version of the crate doesn’t know.