Struct pbjson_types::FieldOptions
source · 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>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self
.source§impl PartialEq<FieldOptions> for FieldOptions
impl PartialEq<FieldOptions> for FieldOptions
source§fn eq(&self, other: &FieldOptions) -> bool
fn eq(&self, other: &FieldOptions) -> bool
self
and other
values to be equal, and is used
by ==
.