Skip to main content

MiddlewareDependencyExt

Trait MiddlewareDependencyExt 

Source
pub trait MiddlewareDependencyExt {
    // Required method
    fn middleware<T>(self) -> Self
       where T: MiddlewareService + 'static;
}
Expand description

Declares a MiddlewareService as a Dependencies entry, so the plugin or service declaring it is built only after the middleware is registered.

Required Methods§

Source

fn middleware<T>(self) -> Self
where T: MiddlewareService + 'static,

Adds T as a middleware dependency.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MiddlewareDependencyExt for Dependencies

Source§

fn middleware<T>(self) -> Self
where T: MiddlewareService + 'static,

Implementors§