pub enum Value<'a> {
Null,
String(Cow<'a, str>),
Number(Number<'a>),
Bool(bool),
Object(BTreeMap<String, Value<'a>>),
Array(Vec<Value<'a>, Global>),
}
Available on crate feature
json
only.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(BTreeMap<String, Value<'a>>)
An object (i.e. items inside curly brackets {}
separated by colon :
and comma ,
)
Array(Vec<Value<'a>, Global>)
An array (i.e. items inside squared brackets []
separated by comma ,
)
Trait Implementations
impl<'a> Eq for Value<'a>
impl<'a> StructuralEq for Value<'a>
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.