pub enum Value {
}Variants§
Null
Bool(bool)
Int(i64)
UInt(u64)
Float(f64)
String(String)
Bytes(Vec<u8>)
Array(Vec<Value>)
Object(ObjectMap<String, Value>)
Map(Vec<(Value, Value)>)
Ref(String)
Tagged(String, Box<Value>)
Timestamp(i64, i16)
JsonNumber(String)
Implementations§
Source§impl Value
impl Value
pub fn is_null(&self) -> bool
pub fn as_bool(&self) -> Option<bool>
pub fn as_int(&self) -> Option<i64>
pub fn as_int_checked(&self) -> Result<i64>
pub fn as_uint(&self) -> Option<u64>
pub fn as_float(&self) -> Option<f64>
pub fn as_str(&self) -> Option<&str>
pub fn as_bytes(&self) -> Option<&[u8]>
pub fn as_array(&self) -> Option<&[Value]>
pub fn as_object(&self) -> Option<&ObjectMap<String, Value>>
pub fn get(&self, key: &str) -> Option<&Value>
pub fn index(&self, idx: usize) -> Option<&Value>
pub fn tl_type(&self) -> TLType
pub fn as_timestamp(&self) -> Option<(i64, i16)>
pub fn as_timestamp_millis(&self) -> Option<i64>
pub fn as_map(&self) -> Option<&[(Value, Value)]>
pub fn as_ref_name(&self) -> Option<&str>
pub fn as_tagged(&self) -> Option<(&str, &Value)>
pub fn as_json_number(&self) -> Option<&str>
Trait Implementations§
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