pub trait ServiceClient: Clone + Sized + Send + 'static {
    type Request: Clone + Send + Sync + Sized + 'static + Debug;
    type Response: Clone + Send + Sync + Sized + 'static + Debug;

    // Required methods
    fn connect_to_endpoint<'async_trait>(
        endpoint: Endpoint
    ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn stream_requests<'life0, 'async_trait, S>(
        &'life0 mut self,
        stream: S
    ) -> Pin<Box<dyn Future<Output = Result<Response<Streaming<Self::Response>>>> + Send + 'async_trait>>
       where S: 'async_trait + IntoStreamingRequest<Message = Self::Request> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

source

type Request: Clone + Send + Sync + Sized + 'static + Debug

source

type Response: Clone + Send + Sync + Sized + 'static + Debug

Required Methods§

source

fn connect_to_endpoint<'async_trait>( endpoint: Endpoint ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn stream_requests<'life0, 'async_trait, S>( &'life0 mut self, stream: S ) -> Pin<Box<dyn Future<Output = Result<Response<Streaming<Self::Response>>>> + Send + 'async_trait>>
where S: 'async_trait + IntoStreamingRequest<Message = Self::Request> + Send, Self: 'async_trait, 'life0: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§