pub enum Value<'a> {
Null,
String(Cow<'a, str>),
Number(Number<'a>),
Bool(bool),
Object(Object<'a>),
Array(Vec<Value<'a>>),
}
Expand description
Reference to JSON data.
Variants§
Null
A null
String(Cow<'a, str>)
A string (i.e. something quoted; quotes are not part of this. Data has not been UTF-8 validated)
Number(Number<'a>)
A number (i.e. something starting with a number with an optional period)
Bool(bool)
A bool (i.e. false
or true
)
Object(Object<'a>)
An object (i.e. items inside curly brackets {}
separated by colon :
and comma ,
)
Array(Vec<Value<'a>>)
An array (i.e. items inside squared brackets []
separated by comma ,
)
Trait Implementations§
impl<'a> Eq for Value<'a>
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