Struct fdb_rl_proto::fdb_rl::key_expression::v1::field::FieldNullInterpretation
source · pub struct FieldNullInterpretation {
pub field_null_interpretation: Option<FieldNullInterpretation>,
}
Expand description
Field presence is the notion of whether a protobuf field has a
value [1]. As of release 3.15, in proto3
, the default is
explicit presence, which is managed by optional
label.
NOTE: We only support proto3
explicit presence discipline.
Following table outlines how presence is tracked for fields in
proto3
[2]. (Note: ‘Singular bool’ field type is missing in the
link, but has been added in the following table).
|–––––––––––––––––––––––+–––––+–––––| | Field type | optional | Explicit | | | | Presence | |–––––––––––––––––––––––+–––––+–––––| | Singular numeric (integer or floating point) | No | | | Singular enum | No | | | Singular string or bytes | No | | | Singular bool | No | | | Singular numeric (integer or floating point) | Yes | Yes | | Singular enum | Yes | Yes | | Singular string or bytes | Yes | Yes | | Singular bool | Yes | Yes | | Singular message | Yes | Yes | | Singular message | No | Yes | | Repeated | N/A | | | Oneofs | N/A | Yes | | Maps | N/A | | |–––––––––––––––––––––––+–––––+–––––|
As you can see from the above table, presence is always tracked
for message
and oneof
. This behavior was previously used to
implement optional primitive types in
google/protobuf/wrappers.proto
. Wrapper types is now deprecated
and should not be used [3].
Under explicit presence discipline, when we have a missing value
(NULL
), it would be interpreted as follows.
[1]: https://protobuf.dev/programming-guides/field_presence/#background [2]: https://protobuf.dev/programming-guides/field_presence/#presence-in-proto3-apis [3]: https://cloud.google.com/apis/design/design_patterns.md#optional_primitive_fields
Fields§
§field_null_interpretation: Option<FieldNullInterpretation>
Required.
Trait Implementations§
source§impl Clone for FieldNullInterpretation
impl Clone for FieldNullInterpretation
source§fn clone(&self) -> FieldNullInterpretation
fn clone(&self) -> FieldNullInterpretation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FieldNullInterpretation
impl Debug for FieldNullInterpretation
source§impl Default for FieldNullInterpretation
impl Default for FieldNullInterpretation
source§impl Message for FieldNullInterpretation
impl Message for FieldNullInterpretation
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<FieldNullInterpretation> for FieldNullInterpretation
impl PartialEq<FieldNullInterpretation> for FieldNullInterpretation
source§fn eq(&self, other: &FieldNullInterpretation) -> bool
fn eq(&self, other: &FieldNullInterpretation) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl ReflectMessage for FieldNullInterpretation
impl ReflectMessage for FieldNullInterpretation
source§fn descriptor(&self) -> MessageDescriptor
fn descriptor(&self) -> MessageDescriptor
MessageDescriptor
describing the type of this message.source§fn transcode_to_dynamic(&self) -> DynamicMessagewhere
Self: Sized,
fn transcode_to_dynamic(&self) -> DynamicMessagewhere Self: Sized,
DynamicMessage
by going
through the byte representation.