mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 14:41:35 +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)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum Outcome {
|
pub enum Outcome {
|
||||||
/// Stop processing this action silently.
|
/// Stop processing this action silently.
|
||||||
DoNothing,
|
DoNothing,
|
||||||
@ -68,9 +69,11 @@ pub enum Outcome {
|
|||||||
/// Send this signal to the command.
|
/// Send this signal to the command.
|
||||||
Signal(Signal),
|
Signal(Signal),
|
||||||
|
|
||||||
/// When command is running: do the inner outcome.
|
/// When command is running, do the first, otherwise the second.
|
||||||
/// Otherwise: start the command.
|
IfRunning(Box<Outcome>, Box<Outcome>),
|
||||||
OrStart(Box<Outcome>),
|
|
||||||
|
/// Clear the screen before doing the inner outcome.
|
||||||
|
ClearAnd(Box<Outcome>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Outcome {
|
impl Default for Outcome {
|
||||||
|
Loading…
Reference in New Issue
Block a user