pub struct MethodEntry {
pub id: MethodId,
pub name: &'static str,
pub full_name: String,
pub doc: String,
pub args: Vec<ArgInfo>,
pub request_shape: &'static Shape,
pub response_shape: &'static Shape,
pub is_streaming: bool,
pub supported_encodings: Vec<Encoding>,
}Expand description
Information about a single RPC method.
Fields§
§id: MethodIdThe method’s unique ID within the registry.
name: &'static strThe method’s name (e.g., “add”).
full_name: StringThe canonical full name (e.g., “Adder.add”).
doc: StringDocumentation string from the method’s /// comments.
args: Vec<ArgInfo>The arguments to this method, in order.
request_shape: &'static ShapeThe request type’s shape (schema).
response_shape: &'static ShapeThe response type’s shape (schema).
is_streaming: boolWhether this is a streaming method.
supported_encodings: Vec<Encoding>Supported wire encodings for this method.
Implementations§
Source§impl MethodEntry
impl MethodEntry
Sourcepub fn supports_encoding(&self, encoding: Encoding) -> bool
pub fn supports_encoding(&self, encoding: Encoding) -> bool
Check if a given encoding is supported by this method.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MethodEntry
impl RefUnwindSafe for MethodEntry
impl Send for MethodEntry
impl Sync for MethodEntry
impl Unpin for MethodEntry
impl UnwindSafe for MethodEntry
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