pub struct ServiceDef {
pub name: String,
pub exec: String,
pub dir: Option<String>,
pub oneshot: bool,
pub env: HashMap<String, String>,
pub status: Status,
pub class: ServiceClass,
pub critical: bool,
}Expand description
Service definition section.
Fields§
§name: String§exec: String§dir: Option<String>§oneshot: bool§env: HashMap<String, String>§status: StatusDesired status: start (default), stop, or ignore.
- start: supervisor ensures service is running
- stop: supervisor ensures service is stopped
- ignore: supervisor doesn’t manage state (manual control)
class: ServiceClassService class: user (default) or system.
- user: normal service, affected by bulk operations (*_all)
- system: protected service, skipped by bulk operations
critical: boolIf true, failure triggers emergency shell (PID1 mode only).
Trait Implementations§
Source§impl Clone for ServiceDef
impl Clone for ServiceDef
Source§fn clone(&self) -> ServiceDef
fn clone(&self) -> ServiceDef
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 ServiceDef
impl Debug for ServiceDef
Source§impl<'de> Deserialize<'de> for ServiceDef
impl<'de> Deserialize<'de> for ServiceDef
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
Source§impl PartialEq for ServiceDef
impl PartialEq for ServiceDef
Source§impl Serialize for ServiceDef
impl Serialize for ServiceDef
impl StructuralPartialEq for ServiceDef
Auto Trait Implementations§
impl Freeze for ServiceDef
impl RefUnwindSafe for ServiceDef
impl Send for ServiceDef
impl Sync for ServiceDef
impl Unpin for ServiceDef
impl UnwindSafe for ServiceDef
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