mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-28 14:11:34 +02:00
Change Outcome::OrStart to the more flexible ::IfRunning
This commit is contained in:
parent
656c0d8fd2
commit
53854d93d4
@ -55,6 +55,7 @@ pub struct Action {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
#[non_exhaustive]
|
||||
pub enum Outcome {
|
||||
/// Stop processing this action silently.
|
||||
DoNothing,
|
||||
@ -68,9 +69,11 @@ pub enum Outcome {
|
||||
/// Send this signal to the command.
|
||||
Signal(Signal),
|
||||
|
||||
/// When command is running: do the inner outcome.
|
||||
/// Otherwise: start the command.
|
||||
OrStart(Box<Outcome>),
|
||||
/// When command is running, do the first, otherwise the second.
|
||||
IfRunning(Box<Outcome>, Box<Outcome>),
|
||||
|
||||
/// Clear the screen before doing the inner outcome.
|
||||
ClearAnd(Box<Outcome>),
|
||||
}
|
||||
|
||||
impl Default for Outcome {
|
||||
|
Loading…
Reference in New Issue
Block a user