pub trait BackendConfig {
type Args;
type Id;
type Kind;
type Config;
type Layer;
// Required methods
fn config(&self) -> &Self::Config;
fn middleware(&mut self, worker: &mut WorkerContext) -> Self::Layer;
}Expand description
Decorates a backend with middleware, configuration and associated types
Required Associated Types§
Required Methods§
Sourcefn middleware(&mut self, worker: &mut WorkerContext) -> Self::Layer
fn middleware(&mut self, worker: &mut WorkerContext) -> Self::Layer
Returns the backend’s middleware layer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<B: BackendConfig> BackendConfig for &mut B
impl<B: BackendConfig> BackendConfig for &mut B
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Id = <B as BackendConfig>::Id
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
fn config(&self) -> &Self::Config
fn middleware(&mut self, worker: &mut WorkerContext) -> Self::Layer
Source§impl<T, E> BackendConfig for BoxStream<'_, Result<T, E>>
impl<T, E> BackendConfig for BoxStream<'_, Result<T, E>>
Implementors§
Source§impl<Args, DB, Fetch, S, Config, E> BackendConfig for CustomBackend<Args, DB, Fetch, S, Config>
impl<Args, DB, Fetch, S, Config, E> BackendConfig for CustomBackend<Args, DB, Fetch, S, Config>
Source§impl<Args> BackendConfig for MemoryStorage<Args>
impl<Args> BackendConfig for MemoryStorage<Args>
Source§impl<Args> BackendConfig for VecDequeBackend<Args>
impl<Args> BackendConfig for VecDequeBackend<Args>
Source§impl<B, Args> BackendConfig for DurableBackend<B, Args>where
B: BackendConfig,
impl<B, Args> BackendConfig for DurableBackend<B, Args>where
B: BackendConfig,
Source§impl<B, E> BackendConfig for BeforeStart<B, E>where
B: BackendConfig,
impl<B, E> BackendConfig for BeforeStart<B, E>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, F> BackendConfig for InspectErr<B, F>where
B: BackendConfig,
impl<B, F> BackendConfig for InspectErr<B, F>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, F> BackendConfig for MapErr<B, F>where
B: BackendConfig,
impl<B, F> BackendConfig for MapErr<B, F>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, FutErr> BackendConfig for AfterStart<B, FutErr>where
B: BackendConfig,
impl<B, FutErr> BackendConfig for AfterStart<B, FutErr>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, FutErr> BackendConfig for AfterStop<B, FutErr>where
B: BackendConfig,
impl<B, FutErr> BackendConfig for AfterStop<B, FutErr>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, FutErr> BackendConfig for BeforeStop<B, FutErr>where
B: BackendConfig,
impl<B, FutErr> BackendConfig for BeforeStop<B, FutErr>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, NewCodec> BackendConfig for WithCodec<B, NewCodec>where
B: BackendConfig,
impl<B, NewCodec> BackendConfig for WithCodec<B, NewCodec>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, S> BackendConfig for Interleave<B, S>where
B: BackendConfig,
impl<B, S> BackendConfig for Interleave<B, S>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B, S> BackendConfig for PollWith<B, S>where
B: BackendConfig,
impl<B, S> BackendConfig for PollWith<B, S>where
B: BackendConfig,
type Id = <B as BackendConfig>::Id
type Args = <B as BackendConfig>::Args
type Kind = <B as BackendConfig>::Kind
type Config = <B as BackendConfig>::Config
type Layer = <B as BackendConfig>::Layer
Source§impl<B> BackendConfig for Instrumented<B>where
B: BackendConfig,
Available on crate feature tracing only.
impl<B> BackendConfig for Instrumented<B>where
B: BackendConfig,
Available on crate feature
tracing only.