#[non_exhaustive]pub struct UninterpretedOption {
pub name: Vec<NamePart>,
pub identifier_value: String,
pub positive_int_value: u64,
pub negative_int_value: i64,
pub double_value: f64,
pub string_value: Bytes,
pub aggregate_value: String,
/* private fields */
}Expand description
A message representing a option the parser does not recognize. This only appears in options protos created by the compiler::Parser class. DescriptorPool resolves these when building Descriptor objects. Therefore, options protos in descriptor objects (e.g. returned by Descriptor::options(), or produced by Descriptor::CopyTo()) will never have UninterpretedOptions in them.
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: Vec<NamePart>§identifier_value: StringThe value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.
positive_int_value: u64§negative_int_value: i64§double_value: f64§string_value: Bytes§aggregate_value: StringImplementations§
Source§impl UninterpretedOption
impl UninterpretedOption
pub fn new() -> Self
Sourcepub fn set_identifier_value<T: Into<String>>(self, v: T) -> Self
pub fn set_identifier_value<T: Into<String>>(self, v: T) -> Self
Sets the value of identifier_value.
§Example
ⓘ
let x = UninterpretedOption::new().set_identifier_value("example");Sourcepub fn set_positive_int_value<T: Into<u64>>(self, v: T) -> Self
pub fn set_positive_int_value<T: Into<u64>>(self, v: T) -> Self
Sets the value of positive_int_value.
§Example
ⓘ
let x = UninterpretedOption::new().set_positive_int_value(42_u32);Sourcepub fn set_negative_int_value<T: Into<i64>>(self, v: T) -> Self
pub fn set_negative_int_value<T: Into<i64>>(self, v: T) -> Self
Sets the value of negative_int_value.
§Example
ⓘ
let x = UninterpretedOption::new().set_negative_int_value(42);Sourcepub fn set_double_value<T: Into<f64>>(self, v: T) -> Self
pub fn set_double_value<T: Into<f64>>(self, v: T) -> Self
Sets the value of double_value.
§Example
ⓘ
let x = UninterpretedOption::new().set_double_value(42.0);Sourcepub fn set_string_value<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_string_value<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of string_value.
§Example
ⓘ
let x = UninterpretedOption::new().set_string_value(bytes::Bytes::from_static(b"example"));Sourcepub fn set_aggregate_value<T: Into<String>>(self, v: T) -> Self
pub fn set_aggregate_value<T: Into<String>>(self, v: T) -> Self
Sets the value of aggregate_value.
§Example
ⓘ
let x = UninterpretedOption::new().set_aggregate_value("example");Trait Implementations§
Source§impl Clone for UninterpretedOption
impl Clone for UninterpretedOption
Source§fn clone(&self) -> UninterpretedOption
fn clone(&self) -> UninterpretedOption
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 UninterpretedOption
impl Debug for UninterpretedOption
Source§impl Default for UninterpretedOption
impl Default for UninterpretedOption
Source§fn default() -> UninterpretedOption
fn default() -> UninterpretedOption
Returns the “default value” for a type. Read more
Source§impl Message for UninterpretedOption
impl Message for UninterpretedOption
Source§impl PartialEq for UninterpretedOption
impl PartialEq for UninterpretedOption
impl StructuralPartialEq for UninterpretedOption
Auto Trait Implementations§
impl !Freeze for UninterpretedOption
impl RefUnwindSafe for UninterpretedOption
impl Send for UninterpretedOption
impl Sync for UninterpretedOption
impl Unpin for UninterpretedOption
impl UnwindSafe for UninterpretedOption
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