pub struct ContentBasedRouter { /* private fields */ }Implementations§
Source§impl ContentBasedRouter
impl ContentBasedRouter
Sourcepub fn new<H>(header: H) -> ContentBasedRouter
pub fn new<H>(header: H) -> ContentBasedRouter
Create a new ContentBasedRouter instance, specifying the header name to inspect for routing.
Example: ContentBasedRouter::new("x-my-header").
§Panics
Panics if the header name is empty.
Trait Implementations§
Source§impl Debug for ContentBasedRouter
impl Debug for ContentBasedRouter
Source§impl Processor for ContentBasedRouter
impl Processor for ContentBasedRouter
Source§fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
exchange: &'life1 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ContentBasedRouter: 'async_trait,
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
exchange: &'life1 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ContentBasedRouter: 'async_trait,
Process the exchange by delegating to the selected processor based on the content-based routing. Returns an error if no matching route is found.
Auto Trait Implementations§
impl Freeze for ContentBasedRouter
impl !RefUnwindSafe for ContentBasedRouter
impl Send for ContentBasedRouter
impl Sync for ContentBasedRouter
impl Unpin for ContentBasedRouter
impl !UnwindSafe for ContentBasedRouter
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