pub enum MapValue<'a> {
Boolean(bool),
Integer(i64),
Ident(Cow<'a, str>),
String(Cow<'a, str>),
Map(Map<'a>),
}Expand description
Option values and literal constants that can appear in .proto files.
§Examples
use protobuf_ast_parser::ast::{Map, MapValue};
use std::borrow::Cow;
let map: Map = [(Cow::from("enabled"), MapValue::from(true))].into();
let value = MapValue::from(map);Variants§
Implementations§
Trait Implementations§
impl<'a> StructuralPartialEq for MapValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for MapValue<'a>
impl<'a> RefUnwindSafe for MapValue<'a>
impl<'a> Send for MapValue<'a>
impl<'a> Sync for MapValue<'a>
impl<'a> Unpin for MapValue<'a>
impl<'a> UnwindSafe for MapValue<'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