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.
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§fn clone_from(&mut self, source: &Self)
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.