pub struct MiddlewareBuilder<TLayerCtx>(pub PhantomData<TLayerCtx>)
where
TLayerCtx: Send;Tuple Fields§
§0: PhantomData<TLayerCtx>Implementations§
Source§impl<TLayerCtx> MiddlewareBuilder<TLayerCtx>where
TLayerCtx: Send,
impl<TLayerCtx> MiddlewareBuilder<TLayerCtx>where
TLayerCtx: Send,
pub fn middleware<TState, TNewCtx, THandlerFunc, THandlerFut>(
&self,
handler: THandlerFunc,
) -> Middleware<TState, TLayerCtx, TNewCtx, THandlerFunc, THandlerFut>where
TState: Send,
THandlerFunc: Fn(MiddlewareContext<TLayerCtx, TLayerCtx, ()>) -> THandlerFut + Clone,
THandlerFut: Future<Output = Result<MiddlewareContext<TLayerCtx, TNewCtx, TState>, Error>> + Send + 'static,
Auto Trait Implementations§
impl<TLayerCtx> Freeze for MiddlewareBuilder<TLayerCtx>
impl<TLayerCtx> RefUnwindSafe for MiddlewareBuilder<TLayerCtx>where
TLayerCtx: RefUnwindSafe,
impl<TLayerCtx> Send for MiddlewareBuilder<TLayerCtx>
impl<TLayerCtx> Sync for MiddlewareBuilder<TLayerCtx>where
TLayerCtx: Sync,
impl<TLayerCtx> Unpin for MiddlewareBuilder<TLayerCtx>where
TLayerCtx: Unpin,
impl<TLayerCtx> UnwindSafe for MiddlewareBuilder<TLayerCtx>where
TLayerCtx: 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