pub enum MessageResponse {
FileDescriptorResponse(FileDescriptorResponse),
AllExtensionNumbersResponse(ExtensionNumberResponse),
ListServicesResponse(ListServiceResponse),
ErrorResponse(ErrorResponse),
}
Expand description
The server sets one of the following fields according to the message_request in the request.
Variants§
FileDescriptorResponse(FileDescriptorResponse)
This message is used to answer file_by_filename, file_containing_symbol, file_containing_extension requests with transitive dependencies. As the repeated label is not allowed in oneof fields, we use a FileDescriptorResponse message to encapsulate the repeated fields. The reflection service is allowed to avoid sending FileDescriptorProtos that were previously sent in response to earlier requests in the stream.
AllExtensionNumbersResponse(ExtensionNumberResponse)
This message is used to answer all_extension_numbers_of_type requests.
ListServicesResponse(ListServiceResponse)
This message is used to answer list_services requests.
ErrorResponse(ErrorResponse)
This message is used when an error occurs.
Implementations§
source§impl MessageResponse
impl MessageResponse
sourcepub fn merge(
field: &mut Option<MessageResponse>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<MessageResponse>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Clone for MessageResponse
impl Clone for MessageResponse
source§fn clone(&self) -> MessageResponse
fn clone(&self) -> MessageResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MessageResponse
impl Debug for MessageResponse
source§impl PartialEq for MessageResponse
impl PartialEq for MessageResponse
source§fn eq(&self, other: &MessageResponse) -> bool
fn eq(&self, other: &MessageResponse) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MessageResponse
Auto Trait Implementations§
impl Freeze for MessageResponse
impl RefUnwindSafe for MessageResponse
impl Send for MessageResponse
impl Sync for MessageResponse
impl Unpin for MessageResponse
impl UnwindSafe for MessageResponse
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request