Macro steward::process

source ·
macro_rules! process {
    {
        tag: $tag:expr,
        cmd: $cmd:expr,
        timeout: $timeout:expr$(,)?
    } => { ... };
    {
        tag: $tag:expr,
        cmd: $cmd:expr$(,)?
    } => { ... };
}
Expand description

Convenience macro for creating a Process.

Examples

Constructing a process with the default KillTimeout:

process! {
  tag: "server",
  cmd: cmd! { ... },
}

Constructing a process with the specific timeout:

use std::time::Duration;

process! {
  tag: "server",
  cmd: cmd! { ... },
  timeout: Duration::from_secs(20).into(),
}