pub enum ClaimKeySource {
Sync(Arc<dyn Fn(&Exchange) -> Result<String, CamelError> + Send + Sync>),
Async(Arc<dyn Fn(&Exchange) -> BoxValueFuture + Send + Sync>),
}Expand description
Fallible claim-check key source.
The sync arm returns an error when the key cannot be resolved. The async
arm evaluates to a Value: null/empty values are a validation error,
strings pass through, other scalars are stringified, and non-scalar
values (array/object) are rejected. Evaluation failures propagate
BEFORE any repository mutation.
Variants§
Sync(Arc<dyn Fn(&Exchange) -> Result<String, CamelError> + Send + Sync>)
Programmatic synchronous extractor.
Async(Arc<dyn Fn(&Exchange) -> BoxValueFuture + Send + Sync>)
Language-backed asynchronous expression.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ClaimKeySource
impl !UnwindSafe for ClaimKeySource
impl Freeze for ClaimKeySource
impl Send for ClaimKeySource
impl Sync for ClaimKeySource
impl Unpin for ClaimKeySource
impl UnsafeUnpin for ClaimKeySource
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