pub enum OnFailureConfig {
IgnoreErrors(bool),
SingleCommand(String),
MultipleCommands(Vec<String>),
Detailed(FailureHandlerConfig),
Advanced {
shell: Option<String>,
claude: Option<String>,
fail_workflow: bool,
retry_original: bool,
max_retries: u32,
},
FailControl {
fail_workflow: bool,
},
Handler(Box<WorkflowStep>),
}Expand description
Configuration for handling command failures
Variants§
IgnoreErrors(bool)
Simple ignore errors flag
SingleCommand(String)
Single command string (shell or claude)
MultipleCommands(Vec<String>)
Multiple command strings
Detailed(FailureHandlerConfig)
Detailed handler configuration
Advanced
Advanced configuration with handler and control flags This must come before FailControl because it has more specific fields
Fields
FailControl
Just control whether to fail the workflow
Handler(Box<WorkflowStep>)
Execute a handler command
Implementations§
Source§impl OnFailureConfig
impl OnFailureConfig
Sourcepub fn should_fail_workflow(&self) -> bool
pub fn should_fail_workflow(&self) -> bool
Check if the workflow should fail after handling this error
Sourcepub fn handler_commands(&self) -> Vec<HandlerCommand>
pub fn handler_commands(&self) -> Vec<HandlerCommand>
Get handler commands as a vector
Sourcepub fn handler(&self) -> Option<WorkflowStep>
pub fn handler(&self) -> Option<WorkflowStep>
Get the handler command if any (for backward compatibility)
Sourcepub fn should_retry(&self) -> bool
pub fn should_retry(&self) -> bool
Check if the original command should be retried If max_retries > 0, we should retry (consistent with regular workflow behavior)
Sourcepub fn max_retries(&self) -> u32
pub fn max_retries(&self) -> u32
Get maximum retry attempts
Sourcepub fn strategy(&self) -> HandlerStrategy
pub fn strategy(&self) -> HandlerStrategy
Get the handler strategy
Sourcepub fn handler_failure_fatal(&self) -> bool
pub fn handler_failure_fatal(&self) -> bool
Check if handler failure should be fatal
Sourcepub fn handler_timeout(&self) -> Option<u64>
pub fn handler_timeout(&self) -> Option<u64>
Get handler timeout in seconds
Trait Implementations§
Source§impl Clone for OnFailureConfig
impl Clone for OnFailureConfig
Source§fn clone(&self) -> OnFailureConfig
fn clone(&self) -> OnFailureConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OnFailureConfig
impl Debug for OnFailureConfig
Source§impl<'de> Deserialize<'de> for OnFailureConfig
impl<'de> Deserialize<'de> for OnFailureConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OnFailureConfig
impl RefUnwindSafe for OnFailureConfig
impl Send for OnFailureConfig
impl Sync for OnFailureConfig
impl Unpin for OnFailureConfig
impl UnsafeUnpin for OnFailureConfig
impl UnwindSafe for OnFailureConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more