Trait PrepareMiddlewareEffect

Source
pub trait PrepareMiddlewareEffect<S>: Sized + 'static {
    type Middleware: Layer<S> + 'static;

    // Required method
    fn take(self, states: &mut StateCollector) -> Self::Middleware;
}
Expand description

prepare for Middleware

it can adding middleware and state

Required Associated Types§

Source

type Middleware: Layer<S> + 'static

Required Methods§

Source

fn take(self, states: &mut StateCollector) -> Self::Middleware

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.

Implementations on Foreign Types§

Source§

impl<S> PrepareMiddlewareEffect<S> for ()

Implementors§

Source§

impl<State: 'static, Service> PrepareMiddlewareEffect<Service> for AddState<State>