[][src]Struct spirit_daemonize::Opts

#[non_exhaustive]pub struct Opts {
    pub daemonize: bool,
    pub foreground: bool,
}

Command line options fragment.

This adds the -d (--daemonize) and -f (--foreground) flag to command line. These override whatever is written in configuration (if merged together with the configuration).

This can be used to transform the Daemon before daemonization.

The Pipeline here can be used to automatically handle both configuration and command line. See the [crate example][index.html#examples].

Flatten this into the top-level StructOpt structure.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
daemonize: bool

Daemonize ‒ go to background (override the config).

foreground: bool

Stay in foreground (don't go to background even if config says so).

Implementations

impl Opts[src]

pub fn daemonize(&self) -> bool[src]

Returns if daemonization is enabled.

pub fn transform(&self, daemon: Daemon) -> Daemon[src]

Modifies the daemon according to daemonization set.

Trait Implementations

impl Clone for Opts[src]

impl Debug for Opts[src]

impl StructOpt for Opts[src]

impl StructOptInternal for Opts[src]

Auto Trait Implementations

impl RefUnwindSafe for Opts

impl Send for Opts

impl Sync for Opts

impl Unpin for Opts

impl UnwindSafe for Opts

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.