Trait Service

Source
pub trait Service:
    Send
    + Sync
    + 'static {
    // Required methods
    fn config<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ConfigRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ConfigResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn status<'life0, 'async_trait>(
        &'life0 self,
        request: Request<StatusRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<StatusResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature grpc only.
Expand description

Generated trait containing gRPC methods that should be implemented for use with ServiceServer.

Required Methods§

Source

fn config<'life0, 'async_trait>( &'life0 self, request: Request<ConfigRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ConfigResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn status<'life0, 'async_trait>( &'life0 self, request: Request<StatusRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StatusResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§