pub struct ServeThenHook<Serv, Hook> { /* private fields */ }
Expand description
A Service function that runs a hook after request execution.
Trait Implementations§
Source§impl<Serv, Hook> Serve for ServeThenHook<Serv, Hook>
impl<Serv, Hook> Serve for ServeThenHook<Serv, Hook>
Auto Trait Implementations§
impl<Serv, Hook> Freeze for ServeThenHook<Serv, Hook>
impl<Serv, Hook> RefUnwindSafe for ServeThenHook<Serv, Hook>where
Serv: RefUnwindSafe,
Hook: RefUnwindSafe,
impl<Serv, Hook> Send for ServeThenHook<Serv, Hook>
impl<Serv, Hook> Sync for ServeThenHook<Serv, Hook>
impl<Serv, Hook> Unpin for ServeThenHook<Serv, Hook>
impl<Serv, Hook> UnwindSafe for ServeThenHook<Serv, Hook>where
Serv: UnwindSafe,
Hook: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<S> RequestHook for Swhere
S: Serve,
impl<S> RequestHook for Swhere
S: Serve,
Source§fn before<Hook>(self, hook: Hook) -> HookThenServe<Self, Hook>
fn before<Hook>(self, hook: Hook) -> HookThenServe<Self, Hook>
Runs a hook before execution of the request. Read more
Source§fn after<Hook>(self, hook: Hook) -> ServeThenHook<Self, Hook>
fn after<Hook>(self, hook: Hook) -> ServeThenHook<Self, Hook>
Runs a hook after completion of a request. Read more
Source§fn before_and_after<Hook>(
self,
hook: Hook,
) -> HookThenServeThenHook<Self::Req, Self::Resp, Self, Hook>
fn before_and_after<Hook>( self, hook: Hook, ) -> HookThenServeThenHook<Self::Req, Self::Resp, Self, Hook>
Runs a hook before and after execution of the request. Read more