[][src]Struct tower_grpc::generic::client::AsService

pub struct AsService<'a, T>(_);

Helper when needing to pass a GrpcService to bounds needing Service.

Trait Implementations

impl<'a, T: Debug> Debug for AsService<'a, T>[src]

impl<'a, T, ReqBody> Service<Request<ReqBody>> for AsService<'a, T> where
    T: GrpcService<ReqBody> + 'a, 
[src]

type Response = Response<T::ResponseBody>

Responses given by the service.

type Future = T::Future

The future response value.

type Error = T::Error

Errors produced by the service.

Auto Trait Implementations

impl<'a, T> Unpin for AsService<'a, T>

impl<'a, T> Sync for AsService<'a, T> where
    T: Sync

impl<'a, T> Send for AsService<'a, T> where
    T: Send

impl<'a, T> !UnwindSafe for AsService<'a, T>

impl<'a, T> RefUnwindSafe for AsService<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T where
    ResBody: Body + Body,
    T: Service<Request<ReqBody>, Response = Response<ResBody>>,
    <T as Service<Request<ReqBody>>>::Error: Into<Box<dyn Error + 'static + Send + Sync>>, 
[src]

type ResponseBody = ResBody

Response body type

type Future = <T as Service<Request<ReqBody>>>::Future

Response future

type Error = <T as Service<Request<ReqBody>>>::Error

Error type

fn into_service(self) -> IntoService<Self> where
    Self: Sized
[src]

Helper when needing to pass this type to bounds needing Service.

fn as_service(&mut self) -> AsService<Self> where
    Self: Sized
[src]

Helper when needing to pass this type to bounds needing Service.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, B1, B2> HttpService<B1> for T where
    B2: Body,
    T: Service<Request<B1>, Response = Response<B2>>, 
[src]

type ResponseBody = B2

Response payload.

type Error = <T as Service<Request<B1>>>::Error

Errors produced by the service.

type Future = <T as Service<Request<B1>>>::Future

The future response value.

fn into_service(self) -> IntoService<Self>[src]

Wrap the HttpService so that it implements tower_service::Service directly. Read more

fn as_service(&mut self) -> AsService<Self>[src]

Same as into_service but operates on an HttpService reference.