pub enum CatchMatcher {
ByVariant(Vec<String>),
Predicate(PredicateSource),
}Expand description
Matcher for a doCatch clause.
Variants§
ByVariant(Vec<String>)
Match by CamelError variant name (e.g. [“ProcessorError”, “Io”]).
"*" matches any variant — equivalent to Camel’s doCatch(Throwable.class).
Predicate(PredicateSource)
Match by a fallible predicate over the Exchange.
Implementations§
Source§impl CatchMatcher
impl CatchMatcher
Sourcepub async fn matches(
&self,
err: &CamelError,
ex: &Exchange,
) -> Result<bool, CamelError>
pub async fn matches( &self, err: &CamelError, ex: &Exchange, ) -> Result<bool, CamelError>
Returns whether this matcher matches the given error and exchange.
A failed predicate evaluation yields Err (language-value-boundary:
the caller chains the original error and fails the scope).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CatchMatcher
impl !UnwindSafe for CatchMatcher
impl Freeze for CatchMatcher
impl Send for CatchMatcher
impl Sync for CatchMatcher
impl Unpin for CatchMatcher
impl UnsafeUnpin for CatchMatcher
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