pub trait ServerReflectionV1alphaExt: ServerReflection {
// Required method
fn register(self: Arc<Self>, router: Router) -> Router;
}Expand description
Generated v1alpha service trait and registration extension, renamed to avoid colliding with the v1 items, for callers that mount the legacy protocol version by hand. Extension trait for registering a service implementation with a Router.
This trait is automatically implemented for all types that implement the service trait.
Prefer Router::add_service for
top-down registration; register remains available for compatibility
and cases where the service-first call shape is more convenient.
§Example
ⓘ
use std::sync::Arc;
let service = Arc::new(MyServiceImpl);
let router = service.register(Router::new());Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".