pub struct FieldOptions {Show 13 fields
pub ctype: Option<i32>,
pub packed: Option<bool>,
pub jstype: Option<i32>,
pub lazy: Option<bool>,
pub unverified_lazy: Option<bool>,
pub deprecated: Option<bool>,
pub weak: Option<bool>,
pub debug_redact: Option<bool>,
pub retention: Option<i32>,
pub targets: Vec<i32>,
pub edition_defaults: Vec<EditionDefault>,
pub features: Option<FeatureSet>,
pub uninterpreted_option: Vec<UninterpretedOption>,
}Fields§
§ctype: Option<i32>§packed: Option<bool>§jstype: Option<i32>§lazy: Option<bool>§unverified_lazy: Option<bool>§deprecated: Option<bool>§weak: Option<bool>§debug_redact: Option<bool>§retention: Option<i32>§targets: Vec<i32>§edition_defaults: Vec<EditionDefault>§features: Option<FeatureSet>§uninterpreted_option: Vec<UninterpretedOption>Implementations§
Source§impl FieldOptions
impl FieldOptions
Sourcepub fn ctype(&self) -> CType
pub fn ctype(&self) -> CType
Returns the enum value of ctype, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn packed(&self) -> bool
pub fn packed(&self) -> bool
Returns the value of packed, or the default value if packed 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 jstype(&self) -> JsType
pub fn jstype(&self) -> JsType
Returns the enum value of jstype, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_jstype(&mut self, value: JsType)
pub fn set_jstype(&mut self, value: JsType)
Sets jstype to the provided enum value.
Sourcepub fn unverified_lazy(&self) -> bool
pub fn unverified_lazy(&self) -> bool
Returns the value of unverified_lazy, or the default value if unverified_lazy is unset.
Sourcepub fn debug_redact(&self) -> bool
pub fn debug_redact(&self) -> bool
Returns the value of debug_redact, or the default value if debug_redact is unset.
Sourcepub fn retention(&self) -> OptionRetention
pub fn retention(&self) -> OptionRetention
Returns the enum value of retention, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_retention(&mut self, value: OptionRetention)
pub fn set_retention(&mut self, value: OptionRetention)
Sets retention to the provided enum value.
Sourcepub fn targets(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<OptionTargetType>>
pub fn targets( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<OptionTargetType>>
Returns an iterator which yields the valid enum values contained in targets.
Sourcepub fn push_targets(&mut self, value: OptionTargetType)
pub fn push_targets(&mut self, value: OptionTargetType)
Appends the provided enum value to targets.
Trait Implementations§
Source§impl Clone for FieldOptions
impl Clone for FieldOptions
Source§fn clone(&self) -> FieldOptions
fn clone(&self) -> FieldOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldOptions
impl Debug for FieldOptions
Source§impl Default for FieldOptions
impl Default for FieldOptions
§impl<'de> Deserialize<'de> for FieldOptions
impl<'de> Deserialize<'de> for FieldOptions
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for FieldOptions
impl Message for FieldOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.