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>>;
fn into_make_service_with_connect_info<C>(
self
) -> IntoMakeServiceWithConnectInfo<HandlerService<Self, T, (), B>, C>;
}
Expand description
Extension trait for Handler
s that don’t have state.
This provides convenience methods to convert the Handler
into a Service
or MakeService
.
Required Methods§
sourcefn into_service(self) -> HandlerService<Self, T, (), B>
fn into_service(self) -> HandlerService<Self, T, (), B>
Convert the handler into a Service
and no state.
sourcefn into_make_service(self) -> IntoMakeService<HandlerService<Self, T, (), B>>
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.
sourcefn into_make_service_with_connect_info<C>(
self
) -> IntoMakeServiceWithConnectInfo<HandlerService<Self, T, (), B>, C>
fn into_make_service_with_connect_info<C>( self ) -> IntoMakeServiceWithConnectInfo<HandlerService<Self, T, (), B>, C>
Available on crate feature
tokio
only.Convert the handler into a MakeService
which stores information
about the incoming connection and has no state.
See HandlerService::into_make_service_with_connect_info
for more details.