From 1eecfa7146edfd1725f1e8ca978888a4aa022d55 Mon Sep 17 00:00:00 2001 From: Bauke Date: Fri, 28 Oct 2022 13:35:34 +0200 Subject: [PATCH] Add the ExitAction enum. --- source/config/exit_action.rs | 11 +++++++++++ source/config/mod.rs | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 source/config/exit_action.rs diff --git a/source/config/exit_action.rs b/source/config/exit_action.rs new file mode 100644 index 0000000..811baea --- /dev/null +++ b/source/config/exit_action.rs @@ -0,0 +1,11 @@ +//! Action to take on hook exit. + +use serde::{Deserialize, Serialize}; + +/// Action to take on hook exit. +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum ExitAction { + Continue, + Stop, +} diff --git a/source/config/mod.rs b/source/config/mod.rs index 60ce7be..20b0f5f 100644 --- a/source/config/mod.rs +++ b/source/config/mod.rs @@ -7,9 +7,11 @@ use { serde::{Deserialize, Serialize}, }; +mod exit_action; mod general; mod task; +pub use exit_action::*; pub use general::*; pub use task::*;