Struct HandlerService
struct HandlerService<H, T, S> { ... }
An adapter that makes a Handler into a Service.
Created with Handler::with_state or HandlerWithoutStateExt::into_service.
Implementations
impl<H, T, S> HandlerService<H, T, S>
fn state(self: &Self) -> &SGet a reference to the state.
fn into_make_service(self: Self) -> IntoMakeService<HandlerService<H, T, S>>Convert the handler into a
MakeService.This allows you to serve a single handler if you don't need any routing:
use ; use SocketAddr; async let app = handler.with_state; # async ;fn into_make_service_with_connect_info<C>(self: Self) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, S>, C>Convert the handler into a
MakeServicewhich stores information about the incoming connection.See
Router::into_make_service_with_connect_infofor more details.use ; use SocketAddr; ; async let app = handler.with_state; # async ;
impl<H, T, S> Clone for HandlerService<H, T, S>
fn clone(self: &Self) -> Self
impl<H, T, S> Debug for HandlerService<H, T, S>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<H, T, S> Freeze for HandlerService<H, T, S>
impl<H, T, S> RefUnwindSafe for HandlerService<H, T, S>
impl<H, T, S> Send for HandlerService<H, T, S>
impl<H, T, S> Sync for HandlerService<H, T, S>
impl<H, T, S> Unpin for HandlerService<H, T, S>
impl<H, T, S> UnsafeUnpin for HandlerService<H, T, S>
impl<H, T, S> UnwindSafe for HandlerService<H, T, S>
impl<H, T, S, B> Service for HandlerService<H, T, S>
fn poll_ready(self: &mut Self, _cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn call(self: &mut Self, req: Request<B>) -> <Self as >::Future
impl<H, T, S, L> Service for HandlerService<H, T, S>
fn poll_ready(self: &mut Self, _cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn call(self: &mut Self, _req: IncomingStream<'_, L>) -> <Self as >::Future
impl<M, S, Target, Request> MakeService for HandlerService<H, T, S>
fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>fn make_service(self: &mut Self, target: Target) -> <M as MakeService<Target, Request>>::Future
impl<S, R> ServiceExt for HandlerService<H, T, S>
fn into_make_service(self: Self) -> IntoMakeService<S>fn into_make_service_with_connect_info<C>(self: Self) -> IntoMakeServiceWithConnectInfo<S, C>
impl<T> Any for HandlerService<H, T, S>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for HandlerService<H, T, S>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for HandlerService<H, T, S>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for HandlerService<H, T, S>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for HandlerService<H, T, S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FromRef for HandlerService<H, T, S>
fn from_ref(input: &T) -> T
impl<T> Instrument for HandlerService<H, T, S>
impl<T> Same for HandlerService<H, T, S>
impl<T> ToOwned for HandlerService<H, T, S>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> WithSubscriber for HandlerService<H, T, S>
impl<T, Request> ServiceExt for HandlerService<H, T, S>
impl<T, U> Into for HandlerService<H, T, S>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for HandlerService<H, T, S>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for HandlerService<H, T, S>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip for HandlerService<H, T, S>
fn vzip(self: Self) -> V