pub struct MethodView<'a> {
pub name: &'a str,
pub request_type_url: &'a str,
pub request_streaming: bool,
pub response_type_url: &'a str,
pub response_streaming: bool,
pub options: RepeatedView<'a, OptionView<'a>>,
pub syntax: EnumValue<Syntax>,
pub edition: &'a str,
pub __buffa_unknown_fields: UnknownFieldsView<'a>,
}Expand description
Method represents a method of an API interface.
New usages of this message as an alternative to MethodDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.
Fields§
§name: &'a strThe simple name of this method.
Field 1: name
request_type_url: &'a strA URL of the input message type.
Field 2: request_type_url
request_streaming: boolIf true, the request is streamed.
Field 3: request_streaming
response_type_url: &'a strThe URL of the output message type.
Field 4: response_type_url
response_streaming: boolIf true, the response is streamed.
Field 5: response_streaming
options: RepeatedView<'a, OptionView<'a>>Any metadata attached to the method.
Field 6: options
syntax: EnumValue<Syntax>The source syntax of this method.
This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue.
Field 7: syntax
edition: &'a strThe source edition string, only valid when syntax is SYNTAX_EDITIONS.
This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue.
Field 8: edition
__buffa_unknown_fields: UnknownFieldsView<'a>Trait Implementations§
Source§impl<'a> Clone for MethodView<'a>
impl<'a> Clone for MethodView<'a>
Source§fn clone(&self) -> MethodView<'a>
fn clone(&self) -> MethodView<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for MethodView<'a>
impl<'a> Debug for MethodView<'a>
Source§impl<'a> Default for MethodView<'a>
impl<'a> Default for MethodView<'a>
Source§fn default() -> MethodView<'a>
fn default() -> MethodView<'a>
Source§impl<'v> DefaultViewInstance for MethodView<'v>
impl<'v> DefaultViewInstance for MethodView<'v>
Source§fn default_view_instance<'a>() -> &'a Selfwhere
Self: 'a,
fn default_view_instance<'a>() -> &'a Selfwhere
Self: 'a,
Source§impl<'a> MessageName for MethodView<'a>
impl<'a> MessageName for MethodView<'a>
Source§const PACKAGE: &'static str = "google.protobuf"
const PACKAGE: &'static str = "google.protobuf"
Source§const NAME: &'static str = "Method"
const NAME: &'static str = "Method"
. between nesting levels. Read moreSource§impl<'a> MessageView<'a> for MethodView<'a>
impl<'a> MessageView<'a> for MethodView<'a>
Source§fn decode_view(buf: &'a [u8]) -> Result<Self, DecodeError>
fn decode_view(buf: &'a [u8]) -> Result<Self, DecodeError>
Source§fn decode_view_with_ctx(
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<Self, DecodeError>
fn decode_view_with_ctx( buf: &'a [u8], ctx: DecodeContext<'_>, ) -> Result<Self, DecodeError>
Source§fn merge_view_field(
&mut self,
tag: Tag,
cur: &'a [u8],
before_tag: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<&'a [u8], DecodeError>
fn merge_view_field( &mut self, tag: Tag, cur: &'a [u8], before_tag: &'a [u8], ctx: DecodeContext<'_>, ) -> Result<&'a [u8], DecodeError>
Source§fn to_owned_message(&self) -> Result<Method, DecodeError>
fn to_owned_message(&self) -> Result<Method, DecodeError>
Source§fn to_owned_from_source(
&self,
__buffa_src: Option<&Bytes>,
) -> Result<Method, DecodeError>
fn to_owned_from_source( &self, __buffa_src: Option<&Bytes>, ) -> Result<Method, DecodeError>
bytes::Bytes-typed fields from source instead of copying. Read moreSource§fn decode_view_ctx(
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<Self, DecodeError>where
Self: Default,
fn decode_view_ctx(
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<Self, DecodeError>where
Self: Default,
DecodeContext
(remaining recursion depth, unknown-field allowance, and element-memory
budget), driving the provided tag loop over
merge_view_field. Read moreSource§fn merge_into_view(
&mut self,
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<(), DecodeError>
fn merge_into_view( &mut self, buf: &'a [u8], ctx: DecodeContext<'_>, ) -> Result<(), DecodeError>
buf into this view (proto merge semantics):
repeated fields append, singular fields last-wins, singular message
fields merge recursively. Read moreSource§impl<'a> ReflectElement for MethodView<'a>
Available on crate feature reflect only.
impl<'a> ReflectElement for MethodView<'a>
reflect only.Source§fn as_value_ref(&self) -> ValueRef<'_>
fn as_value_ref(&self) -> ValueRef<'_>
ValueRef.Source§impl<'a> ReflectMessage for MethodView<'a>
Available on crate feature reflect only.
impl<'a> ReflectMessage for MethodView<'a>
reflect only.Source§fn message_descriptor(&self) -> &MessageDescriptor
fn message_descriptor(&self) -> &MessageDescriptor
Source§fn pool(&self) -> &Arc<DescriptorPool> ⓘ
fn pool(&self) -> &Arc<DescriptorPool> ⓘ
MessageIndex /
EnumIndex from FieldKind,
or Arc::clone it to construct sibling DynamicMessages while
navigating nested fields.Source§fn for_each_set(&self, f: &mut dyn FnMut(&FieldDescriptor, ValueRef<'_>))
fn for_each_set(&self, f: &mut dyn FnMut(&FieldDescriptor, ValueRef<'_>))
Source§fn to_dynamic(&self) -> DynamicMessage
fn to_dynamic(&self) -> DynamicMessage
DynamicMessage. Read moreSource§fn unknown_fields(&self) -> &UnknownFields
fn unknown_fields(&self) -> &UnknownFields
Source§fn which_oneof(&self, oneof: &OneofDescriptor) -> Option<&FieldDescriptor>
fn which_oneof(&self, oneof: &OneofDescriptor) -> Option<&FieldDescriptor>
oneof is set, if any. Read moreSource§impl<'a> ViewEncode<'a> for MethodView<'a>
impl<'a> ViewEncode<'a> for MethodView<'a>
Source§fn compute_size(&self, __cache: &mut SizeCache) -> u32
fn compute_size(&self, __cache: &mut SizeCache) -> u32
Source§fn write_to(&self, __cache: &mut SizeCache, buf: &mut impl EncodeSink)
fn write_to(&self, __cache: &mut SizeCache, buf: &mut impl EncodeSink)
cache (populated by a prior
compute_size call on the same cache). Read moreSource§fn encode(&self, buf: &mut impl EncodeSink)
fn encode(&self, buf: &mut impl EncodeSink)
Source§fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
MAX_MESSAGE_BYTES). Read moreSource§fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl EncodeSink)
fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl EncodeSink)
Source§fn try_encode_with_cache(
&self,
cache: &mut SizeCache,
buf: &mut impl EncodeSink,
) -> Result<(), EncodeError>
fn try_encode_with_cache( &self, cache: &mut SizeCache, buf: &mut impl EncodeSink, ) -> Result<(), EncodeError>
SizeCache,
returning an error instead of panicking if the encoded size exceeds
the 2 GiB protobuf limit (MAX_MESSAGE_BYTES).
Clears the cache first. Read moreSource§fn try_encode_bounded(
&self,
max_bytes: u32,
buf: &mut impl EncodeSink,
) -> Result<u32, EncodeError>
fn try_encode_bounded( &self, max_bytes: u32, buf: &mut impl EncodeSink, ) -> Result<u32, EncodeError>
buf only if its encoded size fits within
max_bytes, using a single size pass that is then reused for the write. Read moreSource§fn try_encode_bounded_with_cache(
&self,
max_bytes: u32,
cache: &mut SizeCache,
buf: &mut impl EncodeSink,
) -> Result<u32, EncodeError>
fn try_encode_bounded_with_cache( &self, max_bytes: u32, cache: &mut SizeCache, buf: &mut impl EncodeSink, ) -> Result<u32, EncodeError>
Source§fn encoded_len(&self) -> u32
fn encoded_len(&self) -> u32
Source§fn try_encoded_len(&self) -> Result<u32, EncodeError>
fn try_encoded_len(&self) -> Result<u32, EncodeError>
MAX_MESSAGE_BYTES). Read moreSource§fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
Source§fn try_encode_length_delimited(
&self,
buf: &mut impl EncodeSink,
) -> Result<(), EncodeError>
fn try_encode_length_delimited( &self, buf: &mut impl EncodeSink, ) -> Result<(), EncodeError>
MAX_MESSAGE_BYTES). Read moreSource§fn try_encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
fn try_encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
Vec<u8>, returning an error instead of panicking
if the encoded size exceeds the 2 GiB protobuf limit
(MAX_MESSAGE_BYTES). Read moreSource§fn encode_to_bytes(&self) -> Bytes
fn encode_to_bytes(&self) -> Bytes
bytes::Bytes. Read moreSource§fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
bytes::Bytes, returning an error instead of
panicking if the encoded size exceeds the 2 GiB protobuf limit
(MAX_MESSAGE_BYTES). Read moreSource§impl ViewReborrow for MethodView<'static>
impl ViewReborrow for MethodView<'static>
Source§type Reborrowed<'b> = MethodView<'b>
type Reborrowed<'b> = MethodView<'b>
'b.Source§fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b>
fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b>
&'b Self (= &'b FooView<'static>) to
&'b Self::Reborrowed<'b> (= &'b FooView<'b>). The canonical body
is just this; the compiler accepts it via standard lifetime
variance for covariant view types. Read more