pub struct Client<S> { /* private fields */ }
Expand description
A client for a gRPC service.
Client
is designed to “clone and use”, so it’s cheap to clone it.
One important thing is that the CallOpt
will not be cloned, because
it’s designed to be per-request.
Implementations§
Trait Implementations§
source§impl<S, Req: Send + 'static> OneShotService<ClientContext, Req> for Client<S>
impl<S, Req: Send + 'static> OneShotService<ClientContext, Req> for Client<S>
§type Response = <S as OneShotService<ClientContext, Req>>::Response
type Response = <S as OneShotService<ClientContext, Req>>::Response
Responses given by the service.
§type Error = <S as OneShotService<ClientContext, Req>>::Error
type Error = <S as OneShotService<ClientContext, Req>>::Error
Errors produced by the service.
Auto Trait Implementations§
impl<S> Freeze for Client<S>where
S: Freeze,
impl<S> RefUnwindSafe for Client<S>where
S: RefUnwindSafe,
impl<S> Send for Client<S>where
S: Send,
impl<S> Sync for Client<S>where
S: Sync,
impl<S> Unpin for Client<S>where
S: Unpin,
impl<S> UnwindSafe for Client<S>where
S: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a volo_grpc::Request
source§impl<T, Cx, Req> ServiceExt<Cx, Req> for Twhere
T: Service<Cx, Req>,
impl<T, Cx, Req> ServiceExt<Cx, Req> for Twhere
T: Service<Cx, Req>,
source§fn map_err<E, F>(self, f: F) -> MapErr<T, F>
fn map_err<E, F>(self, f: F) -> MapErr<T, F>
Maps this service’s error value to a different value. Read more
source§fn map_response<F, Response>(self, f: F) -> MapResponse<T, F>
fn map_response<F, Response>(self, f: F) -> MapResponse<T, F>
Maps this service’s response value to a different value. Read more