pub enum Value {
I64(i64),
U64(u64),
Bytes(Vec<u8>),
F64(F64),
String(String),
Bool(bool),
Array(Vec<Value>),
}Variants§
Implementations§
Source§impl Value
impl Value
pub fn as_i64(&self) -> Option<&i64>
pub fn as_u64(&self) -> Option<&u64>
pub fn as_bytes(&self) -> Option<&Vec<u8>>
pub fn as_f64(&self) -> Option<&F64>
pub fn as_string(&self) -> Option<&String>
pub fn as_bool(&self) -> Option<&bool>
pub fn as_array(&self) -> Option<&Vec<Value>>
pub fn contains(&self, other: &Value) -> Option<bool>
pub fn starts_with(&self, other: &Value) -> Option<bool>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq for Value
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