pub struct ServiceDescriptor { /* private fields */ }Expand description
A linked service descriptor.
Carries the service’s RPC methods. Used by gRPC server reflection, transcoding gateways that route by method, and interceptors that need to know an RPC’s input/output types — the connect-rust use cases.
Constructed only by DescriptorPool; not
constructible by downstream crates.
Implementations§
Source§impl ServiceDescriptor
impl ServiceDescriptor
Sourcepub fn full_name(&self) -> &str
pub fn full_name(&self) -> &str
Fully-qualified proto name without leading dot, e.g.
connectrpc.eliza.v1.ElizaService.
Sourcepub fn options(&self) -> Option<&ServiceOptions>
pub fn options(&self) -> Option<&ServiceOptions>
The raw ServiceOptions for this service, if any were declared.
See FieldDescriptor::options for how to read custom options.
Sourcepub fn methods(&self) -> &[MethodDescriptor]
pub fn methods(&self) -> &[MethodDescriptor]
Methods in declaration order.
Sourcepub fn method(&self, name: &str) -> Option<&MethodDescriptor>
pub fn method(&self, name: &str) -> Option<&MethodDescriptor>
Look up a method by its proto name. O(n) over the methods slice —
services rarely have more than a dozen methods.
Trait Implementations§
Source§impl Clone for ServiceDescriptor
impl Clone for ServiceDescriptor
Source§fn clone(&self) -> ServiceDescriptor
fn clone(&self) -> ServiceDescriptor
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 moreAuto Trait Implementations§
impl Freeze for ServiceDescriptor
impl RefUnwindSafe for ServiceDescriptor
impl Send for ServiceDescriptor
impl Sync for ServiceDescriptor
impl Unpin for ServiceDescriptor
impl UnsafeUnpin for ServiceDescriptor
impl UnwindSafe for ServiceDescriptor
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