Trait dittolive_ditto::prelude::CborValueGetters
source · pub trait CborValueGetters {
// Required methods
fn as_array(&self) -> Option<&[CborValue]>;
fn as_array_mut(&mut self) -> Option<&mut Vec<CborValue>>;
fn as_bool(&self) -> Option<bool>;
fn as_f64(&self) -> Option<f64>;
fn as_i64(&self) -> Option<i64>;
fn as_null(&self) -> Option<()>;
fn as_object(&self) -> Option<&BTreeMap<CborValue, CborValue>>;
fn as_object_mut(&mut self) -> Option<&mut BTreeMap<CborValue, CborValue>>;
fn as_str(&self) -> Option<&str>;
fn as_u64(&self) -> Option<u64>;
fn get(&self, _: impl Index) -> Option<&CborValue>;
fn get_mut(&mut self, _: impl Index) -> Option<&mut CborValue>;
}
Required Methods§
fn as_array(&self) -> Option<&[CborValue]>
fn as_array_mut(&mut self) -> Option<&mut Vec<CborValue>>
fn as_bool(&self) -> Option<bool>
fn as_f64(&self) -> Option<f64>
fn as_i64(&self) -> Option<i64>
fn as_null(&self) -> Option<()>
fn as_object(&self) -> Option<&BTreeMap<CborValue, CborValue>>
fn as_object_mut(&mut self) -> Option<&mut BTreeMap<CborValue, CborValue>>
fn as_str(&self) -> Option<&str>
fn as_u64(&self) -> Option<u64>
fn get(&self, _: impl Index) -> Option<&CborValue>
fn get_mut(&mut self, _: impl Index) -> Option<&mut CborValue>
Object Safety§
This trait is not object safe.