Skip to main content

GrpcHubCapability

Trait GrpcHubCapability 

Source
pub trait GrpcHubCapability: Send + Sync {
    // Required method
    fn bound_endpoint(&self) -> Option<String>;
}
Expand description

gRPC Hub capability: hosts the gRPC server.

This trait is implemented by the single gear responsible for hosting the tonic::Server instance. Only one gear per process should implement this.

Required Methods§

Source

fn bound_endpoint(&self) -> Option<String>

Returns the bound endpoint after the server starts listening.

Examples:

  • TCP: http://127.0.0.1:50652
  • Unix socket: unix:///path/to/socket
  • Named pipe: pipe://\\.\pipe\name

Returns None if the server hasn’t started listening yet.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§