pub struct ReflectionService { /* private fields */ }Expand description
gRPC-compatible server reflection service backed by a Reflector.
Implements both the grpc.reflection.v1 and grpc.reflection.v1alpha
flavors of the protocol (the messages are structurally identical;
older clients — and some current ones, e.g. grpcurl fallback paths —
still speak v1alpha). Register both with install, or register a
single version through the generated extension traits.
use connectrpc::Router;
use connectrpc_reflection::{Reflector, install};
// In real code: include_bytes!(concat!(env!("OUT_DIR"), "/app.fds.bin"))
let reflector = Reflector::from_descriptor_set_bytes(descriptor_set_bytes()).unwrap();
let router = install(Router::new(), reflector);Implementations§
Trait Implementations§
Source§impl Clone for ReflectionService
impl Clone for ReflectionService
Source§fn clone(&self) -> ReflectionService
fn clone(&self) -> ReflectionService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ServerReflection for ReflectionService
impl ServerReflection for ReflectionService
Source§async fn server_reflection_info(
&self,
_ctx: RequestContext,
requests: ServiceStream<StreamMessage<ServerReflectionRequest>>,
) -> ServiceResult<ServiceStream<ServerReflectionResponse>>
async fn server_reflection_info( &self, _ctx: RequestContext, requests: ServiceStream<StreamMessage<ServerReflectionRequest>>, ) -> ServiceResult<ServiceStream<ServerReflectionResponse>>
The reflection service is structured as a bidirectional stream, ensuring
all related requests go to a single server. Read more
Source§impl ServerReflection for ReflectionService
impl ServerReflection for ReflectionService
Source§async fn server_reflection_info(
&self,
_ctx: RequestContext,
requests: ServiceStream<StreamMessage<ServerReflectionRequest>>,
) -> ServiceResult<ServiceStream<ServerReflectionResponse>>
async fn server_reflection_info( &self, _ctx: RequestContext, requests: ServiceStream<StreamMessage<ServerReflectionRequest>>, ) -> ServiceResult<ServiceStream<ServerReflectionResponse>>
The reflection service is structured as a bidirectional stream, ensuring
all related requests go to a single server. Read more
Auto Trait Implementations§
impl Freeze for ReflectionService
impl RefUnwindSafe for ReflectionService
impl Send for ReflectionService
impl Sync for ReflectionService
impl Unpin for ReflectionService
impl UnsafeUnpin for ReflectionService
impl UnwindSafe for ReflectionService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more