#[non_exhaustive]pub enum FieldPresence {
Explicit,
Implicit,
LegacyRequired,
}Expand description
Controls whether field presence is tracked.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Explicit
Presence is tracked explicitly (has-bit or Option).
Implicit
No presence tracking; default value means “not set.”
LegacyRequired
Legacy required behavior from proto2.
Trait Implementations§
Source§impl Clone for FieldPresence
impl Clone for FieldPresence
Source§fn clone(&self) -> FieldPresence
fn clone(&self) -> FieldPresence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldPresence
impl Debug for FieldPresence
Source§impl PartialEq for FieldPresence
impl PartialEq for FieldPresence
Source§fn eq(&self, other: &FieldPresence) -> bool
fn eq(&self, other: &FieldPresence) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for FieldPresence
impl Eq for FieldPresence
impl StructuralPartialEq for FieldPresence
Auto Trait Implementations§
impl Freeze for FieldPresence
impl RefUnwindSafe for FieldPresence
impl Send for FieldPresence
impl Sync for FieldPresence
impl Unpin for FieldPresence
impl UnsafeUnpin for FieldPresence
impl UnwindSafe for FieldPresence
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
Mutably borrows from an owned value. Read more