pub struct ContextService<CXStore, T> {
pub inner: T,
pub ctx: PhantomData<CXStore>,
}Expand description
A service to insert Context into the request processing pipeline, compatible with certain_map.
Fields§
§inner: T§ctx: PhantomData<CXStore>Implementations§
Source§impl<CX, F> ContextService<CX, F>
impl<CX, F> ContextService<CX, F>
pub fn layer<C>() -> impl FactoryLayer<C, F, Factory = Self>
Trait Implementations§
Source§impl<CXStore, F: AsyncMakeService> AsyncMakeService for ContextService<CXStore, F>
impl<CXStore, F: AsyncMakeService> AsyncMakeService for ContextService<CXStore, F>
Source§type Service = ContextService<CXStore, <F as AsyncMakeService>::Service>
type Service = ContextService<CXStore, <F as AsyncMakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as AsyncMakeService>::Error
type Error = <F as AsyncMakeService>::Error
The type of error that can occur during service creation.
Source§impl<CXStore, T> Clone for ContextService<CXStore, T>where
T: Clone,
impl<CXStore, T> Clone for ContextService<CXStore, T>where
T: Clone,
Source§impl<CXStore, F: MakeService> MakeService for ContextService<CXStore, F>
impl<CXStore, F: MakeService> MakeService for ContextService<CXStore, F>
Source§type Service = ContextService<CXStore, <F as MakeService>::Service>
type Service = ContextService<CXStore, <F as MakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as MakeService>::Error
type Error = <F as MakeService>::Error
The type of error that can occur during service creation.
Source§impl<R, T, CXStore, Resp, Err> Service<(R, AcceptedAddr)> for ContextService<CXStore, T>
impl<R, T, CXStore, Resp, Err> Service<(R, AcceptedAddr)> for ContextService<CXStore, T>
impl<CXStore, T> Copy for ContextService<CXStore, T>where
T: Copy,
impl<CXStore, T: Send> Send for ContextService<CXStore, T>
impl<CXStore, T: Sync> Sync for ContextService<CXStore, T>
Auto Trait Implementations§
impl<CXStore, T> Freeze for ContextService<CXStore, T>where
T: Freeze,
impl<CXStore, T> RefUnwindSafe for ContextService<CXStore, T>where
T: RefUnwindSafe,
CXStore: RefUnwindSafe,
impl<CXStore, T> Unpin for ContextService<CXStore, T>
impl<CXStore, T> UnwindSafe for ContextService<CXStore, T>where
T: UnwindSafe,
CXStore: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more