pub struct ExceptionPolicy {
pub matches: Arc<dyn Fn(&CamelError) -> bool + Send + Sync>,
pub retry: Option<RedeliveryPolicy>,
pub handled_by: Option<String>,
}Expand description
A rule that matches specific errors and defines retry + redirect behaviour.
Fields§
§matches: Arc<dyn Fn(&CamelError) -> bool + Send + Sync>Predicate: returns true if this policy applies to the given error.
retry: Option<RedeliveryPolicy>Optional retry configuration; if absent, no retries are attempted.
handled_by: Option<String>Optional URI of a specific endpoint to route failed exchanges to.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExceptionPolicy
impl !RefUnwindSafe for ExceptionPolicy
impl Send for ExceptionPolicy
impl Sync for ExceptionPolicy
impl Unpin for ExceptionPolicy
impl UnsafeUnpin for ExceptionPolicy
impl !UnwindSafe for ExceptionPolicy
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