pub struct EnumOptions {
pub allow_alias: Option<bool>,
pub deprecated: Option<bool>,
pub deprecated_legacy_json_field_conflicts: Option<bool>,
pub features: Option<FeatureSet>,
pub uninterpreted_option: Vec<UninterpretedOption>,
}
Fields§
§allow_alias: Option<bool>
Set this option to true to allow mapping different tag names to the same value.
deprecated: Option<bool>
Is this enum deprecated? Depending on the target platform, this can emit Deprecated annotations for the enum, or it will be completely ignored; in the very least, this is a formalization for deprecating enums.
deprecated_legacy_json_field_conflicts: Option<bool>
Enable the legacy handling of JSON field name conflicts. This lowercases
and strips underscored from the fields before comparison in proto3 only.
The new behavior takes json_name
into account and applies to proto2 as
well.
TODO Remove this legacy behavior once downstream teams have
had time to migrate.
features: Option<FeatureSet>
Any features defined in the specific edition. WARNING: This field should only be used by protobuf plugins or special cases like the proto compiler. Other uses are discouraged and developers should rely on the protoreflect APIs for their client language.
uninterpreted_option: Vec<UninterpretedOption>
The parser stores options it doesn’t recognize here. See above.
Implementations§
Source§impl EnumOptions
impl EnumOptions
Sourcepub fn allow_alias(&self) -> bool
pub fn allow_alias(&self) -> bool
Returns the value of allow_alias
, or the default value if allow_alias
is unset.
Sourcepub fn deprecated(&self) -> bool
pub fn deprecated(&self) -> bool
Returns the value of deprecated
, or the default value if deprecated
is unset.
Sourcepub fn deprecated_legacy_json_field_conflicts(&self) -> bool
pub fn deprecated_legacy_json_field_conflicts(&self) -> bool
Returns the value of deprecated_legacy_json_field_conflicts
, or the default value if deprecated_legacy_json_field_conflicts
is unset.
Trait Implementations§
Source§impl Clone for EnumOptions
impl Clone for EnumOptions
Source§fn clone(&self) -> EnumOptions
fn clone(&self) -> EnumOptions
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EnumOptions
impl Debug for EnumOptions
Source§impl Default for EnumOptions
impl Default for EnumOptions
Source§impl Message for EnumOptions
impl Message for EnumOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl PartialEq for EnumOptions
impl PartialEq for EnumOptions
impl StructuralPartialEq for EnumOptions
Auto Trait Implementations§
impl Freeze for EnumOptions
impl RefUnwindSafe for EnumOptions
impl Send for EnumOptions
impl Sync for EnumOptions
impl Unpin for EnumOptions
impl UnwindSafe for EnumOptions
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