mz_service::grpc

Type Alias ClientTransport

Source
pub type ClientTransport = InterceptedService<Channel, VersionAttachInterceptor>;

Aliased Type§

struct ClientTransport { /* private fields */ }

Implementations

Source§

impl<S, F> InterceptedService<S, F>

Source

pub fn new(service: S, f: F) -> InterceptedService<S, F>
where F: Interceptor,

Create a new InterceptedService that wraps S and intercepts each request with the function F.

Trait Implementations

Source§

impl<S, F> Clone for InterceptedService<S, F>
where S: Clone, F: Clone,

Source§

fn clone(&self) -> InterceptedService<S, F>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S, F> Debug for InterceptedService<S, F>
where S: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<S, F> NamedService for InterceptedService<S, F>
where S: NamedService,

Source§

const NAME: &'static str = S::NAME

The Service-Name as described here.
Source§

impl<S, F, ReqBody, ResBody> Service<Request<ReqBody>> for InterceptedService<S, F>
where ResBody: Default + Body<Data = Bytes, Data = Bytes> + Send + 'static + Body, F: Interceptor, S: Service<Request<ReqBody>, Response = Response<ResBody>>, <S as Service<Request<ReqBody>>>::Error: Into<Box<dyn Error + Send + Sync>>, <ResBody as Body>::Error: Into<Box<dyn Error + Send + Sync>>,

Source§

type Response = Response<UnsyncBoxBody<Bytes, Status>>

Responses given by the service.
Source§

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

Errors produced by the service.
Source§

type Future = ResponseFuture<<S as Service<Request<ReqBody>>>::Future>

The future response value.
Source§

fn poll_ready( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), <InterceptedService<S, F> as Service<Request<ReqBody>>>::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call( &mut self, req: Request<ReqBody>, ) -> <InterceptedService<S, F> as Service<Request<ReqBody>>>::Future

Process the request and return the response asynchronously. Read more
Source§

impl<S, F> Copy for InterceptedService<S, F>
where S: Copy, F: Copy,