Trait axum::handler::HandlerWithoutStateExt

source ·
pub trait HandlerWithoutStateExt<T, B>: Handler<T, (), B> {
    // Required methods
    fn into_service(self) -> HandlerService<Self, T, (), B>;
    fn into_make_service(
        self,
    ) -> IntoMakeService<HandlerService<Self, T, (), B>>;
}
Expand description

Extension trait for Handlers that don’t have state.

This provides convenience methods to convert the Handler into a Service or MakeService.

Required Methods§

source

fn into_service(self) -> HandlerService<Self, T, (), B>

Convert the handler into a Service and no state.

source

fn into_make_service(self) -> IntoMakeService<HandlerService<Self, T, (), B>>

Convert the handler into a MakeService and no state.

See HandlerService::into_make_service for more details.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<H, T, B> HandlerWithoutStateExt<T, B> for H
where H: Handler<T, (), B>,