pub enum JSONValueType {
String,
Number,
Object,
Array,
Bool,
Null,
}
Expand description
Denotes the different types of values JSON objects can have
Numbers
Both floats and integers have a value type of JSONValueType::Number
.
Example
let json_value = JSONValue::parse("[1,2,3]").unwrap();
assert_eq!(json_value.value_type, JSONValueType::Array);
Variants§
Trait Implementations§
source§impl Clone for JSONValueType
impl Clone for JSONValueType
source§fn clone(&self) -> JSONValueType
fn clone(&self) -> JSONValueType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for JSONValueType
impl Debug for JSONValueType
source§impl PartialEq<JSONValueType> for JSONValueType
impl PartialEq<JSONValueType> for JSONValueType
source§fn eq(&self, other: &JSONValueType) -> bool
fn eq(&self, other: &JSONValueType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for JSONValueType
impl Eq for JSONValueType
impl StructuralEq for JSONValueType
impl StructuralPartialEq for JSONValueType
Auto Trait Implementations§
impl RefUnwindSafe for JSONValueType
impl Send for JSONValueType
impl Sync for JSONValueType
impl Unpin for JSONValueType
impl UnwindSafe for JSONValueType
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