pub trait CustomMiddlewareFactory:
Send
+ Sync
+ Debug {
// Provided methods
fn apply_consumer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer: Box<dyn MessageConsumer>,
_route_name: &'life1 str,
_config: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MessageConsumer>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn apply_publisher<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
publisher: Box<dyn MessagePublisher>,
_route_name: &'life1 str,
_config: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MessagePublisher>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Factory for creating custom middleware.
Provided Methods§
fn apply_consumer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer: Box<dyn MessageConsumer>,
_route_name: &'life1 str,
_config: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MessageConsumer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn apply_publisher<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
publisher: Box<dyn MessagePublisher>,
_route_name: &'life1 str,
_config: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MessagePublisher>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".