pub struct Option<'a> {
pub key: Cow<'a, str>,
pub value: MapValue<'a>,
}Expand description
Represents an option statement or an inline option list entry.
§Examples
use protobuf_ast_parser::ast::{MapValue, Option};
let option = Option::new("deprecated", MapValue::from(true));
assert_eq!(option.key, "deprecated");Fields§
§key: Cow<'a, str>§value: MapValue<'a>Implementations§
Trait Implementations§
Source§impl<'a> From<Option<'a>> for MessageEntry<'a>
impl<'a> From<Option<'a>> for MessageEntry<'a>
Source§impl<'a> From<Option<'a>> for OneOfEntry<'a>
impl<'a> From<Option<'a>> for OneOfEntry<'a>
Source§impl<'a> From<Option<'a>> for ServiceEntry<'a>
impl<'a> From<Option<'a>> for ServiceEntry<'a>
impl<'a> StructuralPartialEq for Option<'a>
Auto Trait Implementations§
impl<'a> Freeze for Option<'a>
impl<'a> RefUnwindSafe for Option<'a>
impl<'a> Send for Option<'a>
impl<'a> Sync for Option<'a>
impl<'a> Unpin for Option<'a>
impl<'a> UnwindSafe for Option<'a>
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