[][src]Struct spirit_daemonize::UserDaemon

pub struct UserDaemon { /* fields omitted */ }

A stripped-down version of Daemon without the user-switching options.

Sometimes, the daemon either needs to keep the root privileges or is started with the appropriate user right away, therefore the user should not be able to configure the user and group options.

This configuration fragment serves the role. Convert it to Daemon first, by into_daemon (or using the Into trait).

Examples

use spirit_daemonize::{Daemon, UserDaemon};

// No way to access the `pid_file` and others inside this thing and can't call `.daemonize()`.
let user_daemon = UserDaemon::default();

let daemon: Daemon = user_daemon.into();
assert!(daemon.pid_file.is_none());
assert_eq!(daemon, Daemon::default());

Methods

impl UserDaemon[src]

pub fn into_daemon(self) -> Daemon[src]

Converts to full-featured Daemon.

All the useful functionality is on Daemon, therefore to use it, convert it first.

It can be also converted using the usual From/Into traits.

Trait Implementations

impl Eq for UserDaemon[src]

impl PartialEq<UserDaemon> for UserDaemon[src]

impl Clone for UserDaemon[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for UserDaemon[src]

impl From<UserDaemon> for Daemon[src]

impl Debug for UserDaemon[src]

impl Serialize for UserDaemon[src]

impl<'de> Deserialize<'de> for UserDaemon[src]

impl StructDoc for UserDaemon[src]

Auto Trait Implementations

impl Send for UserDaemon

impl Sync for UserDaemon

Blanket Implementations

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

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> IntoResult for T[src]

impl<T> Erased for T