pub struct ErrorCatcherDefinitionBuilder<'a> { /* private fields */ }Expand description
Builder for constructing an error catcher within a try task.
Implementations§
Source§impl<'a> ErrorCatcherDefinitionBuilder<'a>
impl<'a> ErrorCatcherDefinitionBuilder<'a>
Sourcepub fn errors<F>(&mut self, setup: F) -> &mut Selfwhere
F: FnOnce(&mut ErrorFilterDefinitionBuilder),
pub fn errors<F>(&mut self, setup: F) -> &mut Selfwhere
F: FnOnce(&mut ErrorFilterDefinitionBuilder),
Configures the error filter for this catcher using a builder callback.
Sourcepub fn when(&mut self, when: &str) -> &mut Self
pub fn when(&mut self, when: &str) -> &mut Self
Sets the condition expression for when the catcher applies.
Sourcepub fn retry<F>(&mut self, setup: F) -> &mut Selfwhere
F: FnOnce(&mut RetryPolicyDefinitionBuilder),
pub fn retry<F>(&mut self, setup: F) -> &mut Selfwhere
F: FnOnce(&mut RetryPolicyDefinitionBuilder),
Configures the retry policy for this catcher using a builder callback.
Sourcepub fn as_(&mut self, as_var: &str) -> &mut Self
pub fn as_(&mut self, as_var: &str) -> &mut Self
Sets the variable name to store the caught error.
Sourcepub fn except_when(&mut self, except_when: &str) -> &mut Self
pub fn except_when(&mut self, except_when: &str) -> &mut Self
Sets the condition expression for when the catcher should not apply.
Sourcepub fn do_<F>(&mut self, name: &str, setup: F) -> &mut Selfwhere
F: FnOnce(&mut TaskDefinitionBuilder),
pub fn do_<F>(&mut self, name: &str, setup: F) -> &mut Selfwhere
F: FnOnce(&mut TaskDefinitionBuilder),
Adds a named sub-task to execute when the error is caught.
Auto Trait Implementations§
impl<'a> Freeze for ErrorCatcherDefinitionBuilder<'a>
impl<'a> RefUnwindSafe for ErrorCatcherDefinitionBuilder<'a>
impl<'a> Send for ErrorCatcherDefinitionBuilder<'a>
impl<'a> Sync for ErrorCatcherDefinitionBuilder<'a>
impl<'a> Unpin for ErrorCatcherDefinitionBuilder<'a>
impl<'a> UnsafeUnpin for ErrorCatcherDefinitionBuilder<'a>
impl<'a> !UnwindSafe for ErrorCatcherDefinitionBuilder<'a>
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