Struct pbjson_types::FieldOptions
source · pub struct FieldOptions {Show 14 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 feature_support: Option<FeatureSupport>,
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>
§feature_support: Option<FeatureSupport>
§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(&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 FieldOptions
impl PartialEq 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 ==
.§impl Serialize for FieldOptions
impl Serialize for FieldOptions
impl StructuralPartialEq for FieldOptions
Auto Trait Implementations§
impl Freeze for FieldOptions
impl RefUnwindSafe for FieldOptions
impl Send for FieldOptions
impl Sync for FieldOptions
impl Unpin for FieldOptions
impl UnwindSafe for FieldOptions
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)