Skip to main content

GrpcServiceCapability

Trait GrpcServiceCapability 

Source
pub trait GrpcServiceCapability: Send + Sync {
    // Required method
    fn get_grpc_services<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 GearCtx,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RegisterGrpcServiceFn>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

gRPC Service capability: gears that export gRPC services.

The runtime will call this during the gRPC registration phase to collect all services that should be exposed on the shared gRPC server.

Required Methods§

Source

fn get_grpc_services<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 GearCtx, ) -> Pin<Box<dyn Future<Output = Result<Vec<RegisterGrpcServiceFn>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns all gRPC services this gear wants to expose.

Each installer adds one service to the tonic::Server builder.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§