Struct AsService
pub struct AsService<'a, M, Request> { /* private fields */ }
Service returned by MakeService::as_service.
See the documentation on as_service for details.
Trait Implementations
impl<M, Request> Debug for AsService<'_, M, Request>
where
M: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<M, S, Target, Request> Service<Target> for AsService<'_, M, Request>
where
M: Service<Target, Response = S>,
S: Service<Request>,
type Response = <M as Service<Target>>::Response;type Error = <M as Service<Target>>::Error;type Future = <M as Service<Target>>::Future;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn call(&mut self, target: Target) -> Self::Future
Auto Trait Implementations
impl<'a, M, Request> !UnwindSafe for AsService<'a, M, Request>
impl<'a, M, Request> Freeze for AsService<'a, M, Request>
where
&'a mut M: Freeze,
PhantomData<Request>: Freeze,
impl<'a, M, Request> RefUnwindSafe for AsService<'a, M, Request>
where
&'a mut M: RefUnwindSafe,
PhantomData<Request>: RefUnwindSafe,
impl<'a, M, Request> Send for AsService<'a, M, Request>
where
&'a mut M: Send,
PhantomData<Request>: Send,
impl<'a, M, Request> Sync for AsService<'a, M, Request>
where
&'a mut M: Sync,
PhantomData<Request>: Sync,
impl<'a, M, Request> Unpin for AsService<'a, M, Request>
where
&'a mut M: Unpin,
PhantomData<Request>: Unpin,
impl<'a, M, Request> UnsafeUnpin for AsService<'a, M, Request>
where
&'a mut M: UnsafeUnpin,
PhantomData<Request>: UnsafeUnpin,
Blanket Implementations
impl<C, Target> MakeConnection<Target> for AsService<'a, M, Request>
where
C: Service<Target>,
<C as Service<Target>>::Response: AsyncRead + AsyncWrite,
type Connection = <C as Service<Target>>::Response;type Error = <C as Service<Target>>::Error;type Future = <C as Service<Target>>::Future;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), <C as MakeConnection<Target>>::Error>>fn make_connection(&mut self, target: Target) -> <C as MakeConnection<Target>>::Future
impl<M, S, Target, Request> MakeService<Target, Request> for AsService<'a, M, Request>
where
M: Service<Target, Response = S>,
S: Service<Request>,
type Response = <S as Service<Request>>::Response;type Error = <S as Service<Request>>::Error;type Service = S;type MakeError = <M as Service<Target>>::Error;type Future = <M as Service<Target>>::Future;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>fn make_service(&mut self, target: Target) -> <M as MakeService<Target, Request>>::Future
impl<T> Any for AsService<'a, M, Request>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for AsService<'a, M, Request>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for AsService<'a, M, Request>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for AsService<'a, M, Request>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for AsService<'a, M, Request>
impl<T> WithSubscriber for AsService<'a, M, Request>
impl<T, Request> ServiceExt<Request> for AsService<'a, M, Request>
where
T: Service<Request> + ?Sized,
impl<T, U> Into<U> for AsService<'a, M, Request>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for AsService<'a, M, Request>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for AsService<'a, M, Request>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>