pub struct ErrorHandlerConfig {
pub dlc_uri: Option<String>,
pub policies: Vec<ExceptionPolicy>,
}Expand description
Full error handler configuration: Dead Letter Channel URI and per-exception policies.
Fields§
§dlc_uri: Option<String>URI of the Dead Letter Channel endpoint (None = log only).
policies: Vec<ExceptionPolicy>Per-exception policies evaluated in order; first match wins.
Implementations§
Source§impl ErrorHandlerConfig
impl ErrorHandlerConfig
Sourcepub fn log_only() -> Self
pub fn log_only() -> Self
Log-only error handler: errors are logged but not forwarded anywhere.
Sourcepub fn dead_letter_channel(uri: impl Into<String>) -> Self
pub fn dead_letter_channel(uri: impl Into<String>) -> Self
Dead Letter Channel: failed exchanges are forwarded to the given URI.
Sourcepub fn on_exception(
self,
matches: impl Fn(&CamelError) -> bool + Send + Sync + 'static,
) -> ExceptionPolicyBuilder
pub fn on_exception( self, matches: impl Fn(&CamelError) -> bool + Send + Sync + 'static, ) -> ExceptionPolicyBuilder
Start building an ExceptionPolicy attached to this config.
Trait Implementations§
Source§impl Clone for ErrorHandlerConfig
impl Clone for ErrorHandlerConfig
Source§fn clone(&self) -> ErrorHandlerConfig
fn clone(&self) -> ErrorHandlerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ErrorHandlerConfig
impl !RefUnwindSafe for ErrorHandlerConfig
impl Send for ErrorHandlerConfig
impl Sync for ErrorHandlerConfig
impl Unpin for ErrorHandlerConfig
impl UnsafeUnpin for ErrorHandlerConfig
impl !UnwindSafe for ErrorHandlerConfig
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