#[non_exhaustive]pub enum RecipientSource {
Sync(Arc<dyn Fn(&Exchange) -> String + Send + Sync>),
Async(Arc<dyn Fn(&Exchange) -> BoxValueFuture + Send + Sync>),
}Expand description
Fallible recipient source for the recipient list EIP.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sync(Arc<dyn Fn(&Exchange) -> String + Send + Sync>)
Programmatic synchronous closure producing a recipient.
Async(Arc<dyn Fn(&Exchange) -> BoxValueFuture + Send + Sync>)
Language-backed asynchronous expression.
Implementations§
Trait Implementations§
Source§impl Clone for RecipientSource
impl Clone for RecipientSource
Auto Trait Implementations§
impl !RefUnwindSafe for RecipientSource
impl !UnwindSafe for RecipientSource
impl Freeze for RecipientSource
impl Send for RecipientSource
impl Sync for RecipientSource
impl Unpin for RecipientSource
impl UnsafeUnpin for RecipientSource
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