pub enum Value {
String(String),
Error(String),
Integer(i64),
Bulk(Vec<u8>),
Null,
Array(Vec<Value>),
StaticError(&'static str),
StaticString(&'static str),
}
Variants§
String(String)
Error(String)
Integer(i64)
Bulk(Vec<u8>)
Null
Array(Vec<Value>)
StaticError(&'static str)
StaticString(&'static str)
Implementations§
Source§impl Value
impl Value
pub fn as_integer(&self) -> Result<i64>
pub fn to_integer(self) -> Result<i64>
pub fn as_float(&self) -> Result<f64>
pub fn to_float(self) -> Result<f64>
pub fn as_str(&self) -> Result<&str>
pub fn to_string(self) -> Result<String>
pub fn as_slice(&self) -> Result<&[u8]>
pub fn to_bytes(self) -> Result<Vec<u8>>
Trait Implementations§
impl Eq for Value
impl StructuralPartialEq 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