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§

source

fn as_array(&self) -> Option<&[CborValue]>

source

fn as_array_mut(&mut self) -> Option<&mut Vec<CborValue>>

source

fn as_bool(&self) -> Option<bool>

source

fn as_f64(&self) -> Option<f64>

source

fn as_i64(&self) -> Option<i64>

source

fn as_null(&self) -> Option<()>

source

fn as_object(&self) -> Option<&BTreeMap<CborValue, CborValue>>

source

fn as_object_mut(&mut self) -> Option<&mut BTreeMap<CborValue, CborValue>>

source

fn as_str(&self) -> Option<&str>

source

fn as_u64(&self) -> Option<u64>

source

fn get(&self, _: impl Index) -> Option<&CborValue>

source

fn get_mut(&mut self, _: impl Index) -> Option<&mut CborValue>

Object Safety§

This trait is not object safe.

Implementors§