pub trait CommandMiddleware: Send + Sync {
// Required method
fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 mut Command,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Middleware that modifies a Command before it is spawned.
Required Methods§
fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 mut Command,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: CommandMiddleware + ?Sized> CommandMiddleware for Arc<T>
Lets a shared Arc<dyn CommandMiddleware> be used wherever a middleware is
expected, so the same instance can be layered here and used elsewhere.
impl<T: CommandMiddleware + ?Sized> CommandMiddleware for Arc<T>
Lets a shared Arc<dyn CommandMiddleware> be used wherever a middleware is
expected, so the same instance can be layered here and used elsewhere.