pub enum Value<'a> {
Empty,
Str(&'a [u8], Quote),
Number(Number),
List(Vec<Value<'a>>),
Owned(Vec<u8>),
Map(Vec<(Key, Value<'a>)>),
Segments(Vec<&'a [u8]>),
StringifiedList(Vec<Value<'a>>),
Skipped((usize, usize)),
Literal(&'static str),
}
Expand description
Representation of the value part of key/value pairs in Body
Variants§
Empty
Empty value.
Str(&'a [u8], Quote)
A byte string.
Number(Number)
Parsed number.
List(Vec<Value<'a>>)
A list of byte strings.
Owned(Vec<u8>)
A byte string that is not stored within the Body
. Used for
decoded hex-strings.
Map(Vec<(Key, Value<'a>)>)
An internal key/value map. Used when Parser::split_msg
is set.
Segments(Vec<&'a [u8]>)
Non-contiguous byte string. Not produced by the parser.
StringifiedList(Vec<Value<'a>>)
Skipped((usize, usize))
Elements removed from ARGV lists. Not produced by the parser.
Literal(&'static str)
A literal string. Not produced by the parser.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value<'de>
impl<'de> Deserialize<'de> for Value<'de>
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'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