Function conch_runtime::spawn::if_cmd [] [src]

pub fn if_cmd<C, I, E: ?Sized>(
    conditionals: C,
    else_branch: Option<I>
) -> If<C::IntoIter, I, E> where
    C: IntoIterator<Item = GuardBodyPair<I>>,
    I: IntoIterator,
    I::Item: Spawn<E>, 

Spawns an If commands from number of conditional branches.

If any guard evaluates with a successful exit status, then only its corresponding body will be evaluated. If no guard exits successfully, the else branch will be run, if present. Otherwise, the If command will exit successfully.