pub struct FeatureSet {
pub field_presence: Option<FieldPresence>,
pub enum_type: Option<EnumType>,
pub repeated_field_encoding: Option<RepeatedFieldEncoding>,
pub utf8_validation: Option<Utf8Validation>,
pub message_encoding: Option<MessageEncoding>,
pub json_format: Option<JsonFormat>,
pub enforce_naming_style: Option<EnforceNamingStyle>,
pub default_symbol_visibility: Option<DefaultSymbolVisibility>,
/* private fields */
}Expand description
=================================================================== Features
TODO Enums in C++ gencode (and potentially other languages) are not well scoped. This means that each of the feature enums below can clash with each other. The short names we’ve chosen maximize call-site readability, but leave us very open to this scenario. A future feature will be designed and implemented to handle this, hopefully before we ever hit a conflict here.
Fields§
§field_presence: Option<FieldPresence>Field 1: field_presence
enum_type: Option<EnumType>Field 2: enum_type
repeated_field_encoding: Option<RepeatedFieldEncoding>Field 3: repeated_field_encoding
utf8_validation: Option<Utf8Validation>Field 4: utf8_validation
message_encoding: Option<MessageEncoding>Field 5: message_encoding
json_format: Option<JsonFormat>Field 6: json_format
enforce_naming_style: Option<EnforceNamingStyle>Field 7: enforce_naming_style
default_symbol_visibility: Option<DefaultSymbolVisibility>Field 8: default_symbol_visibility
Implementations§
Source§impl FeatureSet
impl FeatureSet
Source§impl FeatureSet
impl FeatureSet
Sourcepub fn with_field_presence(self, value: impl Into<FieldPresence>) -> Self
pub fn with_field_presence(self, value: impl Into<FieldPresence>) -> Self
Sets Self::field_presence to Some(value), consuming and returning self.
Sourcepub fn with_enum_type(self, value: impl Into<EnumType>) -> Self
pub fn with_enum_type(self, value: impl Into<EnumType>) -> Self
Sets Self::enum_type to Some(value), consuming and returning self.
Sourcepub fn with_repeated_field_encoding(
self,
value: impl Into<RepeatedFieldEncoding>,
) -> Self
pub fn with_repeated_field_encoding( self, value: impl Into<RepeatedFieldEncoding>, ) -> Self
Sets Self::repeated_field_encoding to Some(value), consuming and returning self.
Sourcepub fn with_utf8_validation(self, value: impl Into<Utf8Validation>) -> Self
pub fn with_utf8_validation(self, value: impl Into<Utf8Validation>) -> Self
Sets Self::utf8_validation to Some(value), consuming and returning self.
Sourcepub fn with_message_encoding(self, value: impl Into<MessageEncoding>) -> Self
pub fn with_message_encoding(self, value: impl Into<MessageEncoding>) -> Self
Sets Self::message_encoding to Some(value), consuming and returning self.
Sourcepub fn with_json_format(self, value: impl Into<JsonFormat>) -> Self
pub fn with_json_format(self, value: impl Into<JsonFormat>) -> Self
Sets Self::json_format to Some(value), consuming and returning self.
Sourcepub fn with_enforce_naming_style(
self,
value: impl Into<EnforceNamingStyle>,
) -> Self
pub fn with_enforce_naming_style( self, value: impl Into<EnforceNamingStyle>, ) -> Self
Sets Self::enforce_naming_style to Some(value), consuming and returning self.
Sourcepub fn with_default_symbol_visibility(
self,
value: impl Into<DefaultSymbolVisibility>,
) -> Self
pub fn with_default_symbol_visibility( self, value: impl Into<DefaultSymbolVisibility>, ) -> Self
Sets Self::default_symbol_visibility to Some(value), consuming and returning self.
Trait Implementations§
Source§impl Clone for FeatureSet
impl Clone for FeatureSet
Source§fn clone(&self) -> FeatureSet
fn clone(&self) -> FeatureSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FeatureSet
impl Debug for FeatureSet
Source§impl Default for FeatureSet
impl Default for FeatureSet
Source§fn default() -> FeatureSet
fn default() -> FeatureSet
Source§impl DefaultInstance for FeatureSet
impl DefaultInstance for FeatureSet
Source§fn default_instance() -> &'static Self
fn default_instance() -> &'static Self
Source§impl ExtensionSet for FeatureSet
impl ExtensionSet for FeatureSet
Source§const PROTO_FQN: &'static str = "google.protobuf.FeatureSet"
const PROTO_FQN: &'static str = "google.protobuf.FeatureSet"
"google.protobuf.FieldOptions". Read moreSource§fn unknown_fields(&self) -> &UnknownFields
fn unknown_fields(&self) -> &UnknownFields
Source§fn unknown_fields_mut(&mut self) -> &mut UnknownFields
fn unknown_fields_mut(&mut self) -> &mut UnknownFields
Source§fn extension<C>(&self, ext: &Extension<C>) -> <C as ExtensionCodec>::Outputwhere
C: ExtensionCodec,
fn extension<C>(&self, ext: &Extension<C>) -> <C as ExtensionCodec>::Outputwhere
C: ExtensionCodec,
Source§fn set_extension<C>(
&mut self,
ext: &Extension<C>,
value: <C as ExtensionCodec>::Value,
)where
C: ExtensionCodec,
fn set_extension<C>(
&mut self,
ext: &Extension<C>,
value: <C as ExtensionCodec>::Value,
)where
C: ExtensionCodec,
Source§fn has_extension<C>(&self, ext: &Extension<C>) -> boolwhere
C: ExtensionCodec,
fn has_extension<C>(&self, ext: &Extension<C>) -> boolwhere
C: ExtensionCodec,
true if any record at the extension’s field number is present. Read moreSource§fn clear_extension<C>(&mut self, ext: &Extension<C>)where
C: ExtensionCodec,
fn clear_extension<C>(&mut self, ext: &Extension<C>)where
C: ExtensionCodec,
Source§fn extension_or_default<C>(
&self,
ext: &Extension<C>,
) -> <C as ExtensionCodec>::Valuewhere
C: ExtensionCodec<Output = Option<<C as ExtensionCodec>::Value>>,
<C as ExtensionCodec>::Value: Default,
fn extension_or_default<C>(
&self,
ext: &Extension<C>,
) -> <C as ExtensionCodec>::Valuewhere
C: ExtensionCodec<Output = Option<<C as ExtensionCodec>::Value>>,
<C as ExtensionCodec>::Value: Default,
[default = ...]
value if absent, or the type’s Default if no proto default was declared. Read moreSource§impl Message for FeatureSet
impl Message for FeatureSet
Source§fn compute_size(&self, _cache: &mut SizeCache) -> u32
fn compute_size(&self, _cache: &mut SizeCache) -> u32
Returns the total encoded size in bytes.
The result is a u32; the protobuf specification requires all
messages to fit within 2 GiB (2,147,483,647 bytes), so a
compliant message will never overflow this type.
Source§fn write_to(&self, _cache: &mut SizeCache, buf: &mut impl BufMut)
fn write_to(&self, _cache: &mut SizeCache, buf: &mut impl BufMut)
cache (populated by a prior
compute_size call on the same cache). Read moreSource§fn merge_field(
&mut self,
tag: Tag,
buf: &mut impl Buf,
depth: u32,
) -> Result<(), DecodeError>
fn merge_field( &mut self, tag: Tag, buf: &mut impl Buf, depth: u32, ) -> Result<(), DecodeError>
buf. Read moreSource§fn encode(&self, buf: &mut impl BufMut)
fn encode(&self, buf: &mut impl BufMut)
Source§fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl BufMut)
fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl BufMut)
SizeCache, for
reuse across many encodes in a hot loop. Clears the cache first.Source§fn encoded_len(&self) -> u32
fn encoded_len(&self) -> u32
Source§fn encode_length_delimited(&self, buf: &mut impl BufMut)
fn encode_length_delimited(&self, buf: &mut impl BufMut)
Source§fn encode_to_bytes(&self) -> Bytes
fn encode_to_bytes(&self) -> Bytes
bytes::Bytes. Read moreSource§fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn merge_to_limit(
&mut self,
buf: &mut impl Buf,
depth: u32,
limit: usize,
) -> Result<(), DecodeError>
fn merge_to_limit( &mut self, buf: &mut impl Buf, depth: u32, limit: usize, ) -> Result<(), DecodeError>
Source§fn merge_group(
&mut self,
buf: &mut impl Buf,
depth: u32,
field_number: u32,
) -> Result<(), DecodeError>
fn merge_group( &mut self, buf: &mut impl Buf, depth: u32, field_number: u32, ) -> Result<(), DecodeError>
buf, reading fields until an
EndGroup tag with the given field_number is encountered. Read moreSource§fn merge(&mut self, buf: &mut impl Buf, depth: u32) -> Result<(), DecodeError>
fn merge(&mut self, buf: &mut impl Buf, depth: u32) -> Result<(), DecodeError>
Source§fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
Source§fn merge_length_delimited(
&mut self,
buf: &mut impl Buf,
depth: u32,
) -> Result<(), DecodeError>
fn merge_length_delimited( &mut self, buf: &mut impl Buf, depth: u32, ) -> Result<(), DecodeError>
Source§impl MessageName for FeatureSet
impl MessageName for FeatureSet
Source§const PACKAGE: &'static str = "google.protobuf"
const PACKAGE: &'static str = "google.protobuf"
Source§const NAME: &'static str = "FeatureSet"
const NAME: &'static str = "FeatureSet"
. between nesting levels. Read moreSource§impl PartialEq for FeatureSet
impl PartialEq for FeatureSet
Source§fn eq(&self, other: &FeatureSet) -> bool
fn eq(&self, other: &FeatureSet) -> bool
self and other values to be equal, and is used by ==.