pub enum Value {
Array(Array),
Bool(bool),
Null,
Number(Number),
Object(Object),
String(String),
}Expand description
A JSON value.
Variants§
Implementations§
Source§impl Value
impl Value
pub fn as_array(&self) -> Option<Array>
pub fn as_bool(&self) -> Option<bool>
pub fn as_decimal(&self) -> Option<f64>
pub fn as_integer(&self) -> Option<i128>
pub fn as_number(&self) -> Option<Number>
pub fn as_object(&self) -> Option<Object>
pub fn as_string(&self) -> Option<String>
pub fn is_array(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_decimal(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_object(&self) -> bool
pub fn is_string(&self) -> bool
Trait Implementations§
Source§impl FromIterator<Value> for Array
impl FromIterator<Value> for Array
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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