pub enum RetryOn {
Any,
Timeout,
Custom(Arc<dyn Fn(&GraphError) -> bool + Send + Sync>),
}Expand description
Which failures a policy retries.
Variants§
Any
Every failure except an interrupt.
An interrupt is control flow, not an error: it means a person or a node
asked the run to pause. Retrying it would spin. Any therefore excludes
it, which is worth stating because the name reads as though it would not.
Timeout
Only a node timeout.
Custom(Arc<dyn Fn(&GraphError) -> bool + Send + Sync>)
A caller-supplied predicate.
Implementations§
Source§impl RetryOn
impl RetryOn
Sourcepub fn should_retry(&self, error: &GraphError) -> bool
pub fn should_retry(&self, error: &GraphError) -> bool
Whether this error should be retried.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RetryOn
impl !UnwindSafe for RetryOn
impl Freeze for RetryOn
impl Send for RetryOn
impl Sync for RetryOn
impl Unpin for RetryOn
impl UnsafeUnpin for RetryOn
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