#[non_exhaustive]pub struct EnumValueDescriptorProto {
pub name: String,
pub number: i32,
pub options: Option<EnumValueOptions>,
/* private fields */
}Expand description
Describes a value within an enum.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: String§number: i32§options: Option<EnumValueOptions>Implementations§
Source§impl EnumValueDescriptorProto
impl EnumValueDescriptorProto
pub fn new() -> Self
Sourcepub fn set_number<T: Into<i32>>(self, v: T) -> Self
pub fn set_number<T: Into<i32>>(self, v: T) -> Self
Sets the value of number.
Sourcepub fn set_options<T>(self, v: T) -> Selfwhere
T: Into<EnumValueOptions>,
pub fn set_options<T>(self, v: T) -> Selfwhere
T: Into<EnumValueOptions>,
Sets the value of options.
Sourcepub fn set_or_clear_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<EnumValueOptions>,
pub fn set_or_clear_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<EnumValueOptions>,
Sets or clears the value of options.
Trait Implementations§
Source§impl Clone for EnumValueDescriptorProto
impl Clone for EnumValueDescriptorProto
Source§fn clone(&self) -> EnumValueDescriptorProto
fn clone(&self) -> EnumValueDescriptorProto
Returns a duplicate 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 EnumValueDescriptorProto
impl Debug for EnumValueDescriptorProto
Source§impl Default for EnumValueDescriptorProto
impl Default for EnumValueDescriptorProto
Source§fn default() -> EnumValueDescriptorProto
fn default() -> EnumValueDescriptorProto
Returns the “default value” for a type. Read more
Source§impl Message for EnumValueDescriptorProto
impl Message for EnumValueDescriptorProto
Source§impl PartialEq for EnumValueDescriptorProto
impl PartialEq for EnumValueDescriptorProto
impl StructuralPartialEq for EnumValueDescriptorProto
Auto Trait Implementations§
impl Freeze for EnumValueDescriptorProto
impl RefUnwindSafe for EnumValueDescriptorProto
impl Send for EnumValueDescriptorProto
impl Sync for EnumValueDescriptorProto
impl Unpin for EnumValueDescriptorProto
impl UnwindSafe for EnumValueDescriptorProto
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