Struct psup_impl::Task[][src]

pub struct Task { /* fields omitted */ }

Defines a worker process command.

Implementations

impl Task[src]

pub fn new(cmd: &str) -> Self[src]

Create a new task.

pub fn args<I, S>(self, args: I) -> Self where
    I: IntoIterator<Item = S>,
    S: AsRef<str>, 
[src]

Set command arguments.

pub fn envs<I, K, V>(self, vars: I) -> Self where
    I: IntoIterator<Item = (K, V)>,
    K: AsRef<str>,
    V: AsRef<str>, 
[src]

Set command environment variables.

pub fn daemon(self, flag: bool) -> Self[src]

Set the daemon flag for the worker command.

Daemon processes are restarted if they die without being explicitly shutdown by the supervisor.

pub fn detached(self, flag: bool) -> Self[src]

Set the detached flag for the worker command.

If a worker is detached it will not connect to the IPC socket.

Trait Implementations

impl Clone for Task[src]

impl Debug for Task[src]

Auto Trait Implementations

impl RefUnwindSafe for Task

impl Send for Task

impl Sync for Task

impl Unpin for Task

impl UnwindSafe for Task

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> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,