pub trait CborValueExt {
// Required methods
fn as_str(&self) -> Option<&str>;
fn as_i64(&self) -> Option<i64>;
fn as_u64(&self) -> Option<u64>;
fn as_f64(&self) -> Option<f64>;
fn get(&self, key: &str) -> Option<&Value>;
fn get_mut(&mut self, key: &str) -> Option<&mut Value>;
}Required Methods§
Sourcefn as_i64(&self) -> Option<i64>
fn as_i64(&self) -> Option<i64>
Try to extract an i64. Returns None if the value is not an
integer or doesn’t fit.
Sourcefn as_u64(&self) -> Option<u64>
fn as_u64(&self) -> Option<u64>
Try to extract a u64. Returns None if the value is not an
integer or doesn’t fit.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".