pub trait MiddlewareExt<S>: Sized + for<'a> Middleware<'a, S> {
// Provided methods
fn chain<M>(self, next: M) -> Chain<Self, M>
where M: for<'a> Middleware<'a, S> { ... }
fn end<E>(self, next: E) -> Chain<Self, E>
where E: for<'a> Endpoint<'a, S> { ... }
fn shared(self) -> Shared<S>
where S: 'static { ... }
}
Expand description
A set of method to chain middleware/endpoint to middleware or make middleware shared.
Provided Methods§
Sourcefn chain<M>(self, next: M) -> Chain<Self, M>where
M: for<'a> Middleware<'a, S>,
fn chain<M>(self, next: M) -> Chain<Self, M>where
M: for<'a> Middleware<'a, S>,
Chain two middlewares.
Sourcefn end<E>(self, next: E) -> Chain<Self, E>where
E: for<'a> Endpoint<'a, S>,
fn end<E>(self, next: E) -> Chain<Self, E>where
E: for<'a> Endpoint<'a, S>,
Chain an endpoint to a middleware.
Make middleware shared.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.