#[repr(i32)]pub enum RepeatedFieldEncoding {
Unknown,
Packed,
Expanded,
}
Variants§
Implementations§
source§impl RepeatedFieldEncoding
impl RepeatedFieldEncoding
sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of RepeatedFieldEncoding
.
sourcepub fn from_i32(value: i32) -> Option<RepeatedFieldEncoding>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<RepeatedFieldEncoding>
Converts an i32
to a RepeatedFieldEncoding
, or None
if value
is not a valid variant.
source§impl RepeatedFieldEncoding
impl RepeatedFieldEncoding
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for RepeatedFieldEncoding
impl Clone for RepeatedFieldEncoding
source§fn clone(&self) -> RepeatedFieldEncoding
fn clone(&self) -> RepeatedFieldEncoding
Returns a copy of the value. Read more
1.0.0 · 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 RepeatedFieldEncoding
impl Debug for RepeatedFieldEncoding
source§impl Default for RepeatedFieldEncoding
impl Default for RepeatedFieldEncoding
source§fn default() -> RepeatedFieldEncoding
fn default() -> RepeatedFieldEncoding
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for RepeatedFieldEncoding
impl<'de> Deserialize<'de> for RepeatedFieldEncoding
§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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<RepeatedFieldEncoding> for i32
impl From<RepeatedFieldEncoding> for i32
source§fn from(value: RepeatedFieldEncoding) -> i32
fn from(value: RepeatedFieldEncoding) -> i32
Converts to this type from the input type.
source§impl Hash for RepeatedFieldEncoding
impl Hash for RepeatedFieldEncoding
source§impl Ord for RepeatedFieldEncoding
impl Ord for RepeatedFieldEncoding
source§fn cmp(&self, other: &RepeatedFieldEncoding) -> Ordering
fn cmp(&self, other: &RepeatedFieldEncoding) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<RepeatedFieldEncoding> for RepeatedFieldEncoding
impl PartialEq<RepeatedFieldEncoding> for RepeatedFieldEncoding
source§fn eq(&self, other: &RepeatedFieldEncoding) -> bool
fn eq(&self, other: &RepeatedFieldEncoding) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RepeatedFieldEncoding> for RepeatedFieldEncoding
impl PartialOrd<RepeatedFieldEncoding> for RepeatedFieldEncoding
source§fn partial_cmp(&self, other: &RepeatedFieldEncoding) -> Option<Ordering>
fn partial_cmp(&self, other: &RepeatedFieldEncoding) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl Serialize for RepeatedFieldEncoding
impl Serialize for RepeatedFieldEncoding
source§impl TryFrom<i32> for RepeatedFieldEncoding
impl TryFrom<i32> for RepeatedFieldEncoding
§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
source§fn try_from(value: i32) -> Result<RepeatedFieldEncoding, DecodeError>
fn try_from(value: i32) -> Result<RepeatedFieldEncoding, DecodeError>
Performs the conversion.
impl Copy for RepeatedFieldEncoding
impl Eq for RepeatedFieldEncoding
impl StructuralEq for RepeatedFieldEncoding
impl StructuralPartialEq for RepeatedFieldEncoding
Auto Trait Implementations§
impl RefUnwindSafe for RepeatedFieldEncoding
impl Send for RepeatedFieldEncoding
impl Sync for RepeatedFieldEncoding
impl Unpin for RepeatedFieldEncoding
impl UnwindSafe for RepeatedFieldEncoding
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