Struct viz_core::handler::FnExtHandler
source · [−]pub struct FnExtHandler<H, E, O>(_, _);
Expand description
A wrapper of the extractors handler.
Trait Implementations
sourceimpl<H, E, O> Clone for FnExtHandler<H, E, O> where
H: Clone,
impl<H, E, O> Clone for FnExtHandler<H, E, O> where
H: Clone,
sourceimpl<H, E, O> Handler<Request<Body>> for FnExtHandler<H, E, O> where
E: FromRequest + Send + Sync + 'static,
E::Error: IntoResponse + Send + Sync,
H: FnExt<E, Output = Result<O>>,
O: Send + Sync + 'static,
impl<H, E, O> Handler<Request<Body>> for FnExtHandler<H, E, O> where
E: FromRequest + Send + Sync + 'static,
E::Error: IntoResponse + Send + Sync,
H: FnExt<E, Output = Result<O>>,
O: Send + Sync + 'static,
sourcefn call<'life0, 'async_trait>(
&'life0 self,
req: Request
) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
req: Request
) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Performs the call operation.
Auto Trait Implementations
impl<H, E, O> RefUnwindSafe for FnExtHandler<H, E, O> where
H: RefUnwindSafe,
impl<H, E, O> Send for FnExtHandler<H, E, O> where
H: Send,
impl<H, E, O> Sync for FnExtHandler<H, E, O> where
H: Sync,
impl<H, E, O> Unpin for FnExtHandler<H, E, O> where
H: Unpin,
impl<H, E, O> UnwindSafe for FnExtHandler<H, E, O> where
H: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<I, T> HandlerExt<I> for T where
T: Handler<I> + ?Sized,
impl<I, T> HandlerExt<I> for T where
T: Handler<I> + ?Sized,
sourcefn boxed(self) -> BoxHandler<I, Self::Output> where
Self: Sized,
fn boxed(self) -> BoxHandler<I, Self::Output> where
Self: Sized,
Converts this Handler into a BoxHandler.
sourcefn before<F>(self, f: F) -> Before<Self, F> where
Self: Sized,
fn before<F>(self, f: F) -> Before<Self, F> where
Self: Sized,
Maps the input before the handler calls.
sourcefn after<F>(self, f: F) -> After<Self, F> where
Self: Sized,
fn after<F>(self, f: F) -> After<Self, F> where
Self: Sized,
Maps the output Result<T>
after the handler called.
sourcefn around<F>(self, f: F) -> Around<Self, F> where
Self: Sized,
fn around<F>(self, f: F) -> Around<Self, F> where
Self: Sized,
Wraps around the remaining handler or middleware chain.
sourcefn map<F>(self, f: F) -> Map<Self, F> where
Self: Sized,
fn map<F>(self, f: F) -> Map<Self, F> where
Self: Sized,
Maps the Ok
value of the output if after the handler called.
sourcefn map_into_response<O>(self) -> MapInToResponse<Self, O> where
Self: Sized,
fn map_into_response<O>(self) -> MapInToResponse<Self, O> where
Self: Sized,
Maps the handler’s output type to the Response
.
sourcefn and_then<F>(self, f: F) -> AndThen<Self, F> where
Self: Sized,
fn and_then<F>(self, f: F) -> AndThen<Self, F> where
Self: Sized,
Calls op if the result is Ok, otherwise returns the Err value of self.
sourcefn map_err<F>(self, f: F) -> MapErr<Self, F> where
Self: Sized,
fn map_err<F>(self, f: F) -> MapErr<Self, F> where
Self: Sized,
Maps the Err
value of the output if after the handler called.
sourcefn or_else<F>(self, f: F) -> OrElse<Self, F> where
Self: Sized,
fn or_else<F>(self, f: F) -> OrElse<Self, F> where
Self: Sized,
Calls op
if the output is Err
, otherwise returns the Ok
value of the output.
sourcefn catch_error<F, R, E>(self, f: F) -> CatchError<Self, F, R, E> where
Self: Sized,
fn catch_error<F, R, E>(self, f: F) -> CatchError<Self, F, R, E> where
Self: Sized,
Catches rejected error while calling the handler.
sourcefn catch_unwind<F>(self, f: F) -> CatchUnwind<Self, F> where
Self: Sized,
fn catch_unwind<F>(self, f: F) -> CatchUnwind<Self, F> where
Self: Sized,
Catches unwinding panics while calling the handler.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more