simd_json::derived

Trait ValueObjectAccessAsObject

Source
pub trait ValueObjectAccessAsObject {
    type Key: ?Sized;
    type Object: Object;

    // Required method
    fn get_object<Q>(&self, k: &Q) -> Option<&Self::Object>
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + Ord + ?Sized;
}
Expand description

Access to object values in an object

Required Associated Types§

Source

type Key: ?Sized

The type for Objects

Source

type Object: Object

The object structure

Required Methods§

Source

fn get_object<Q>(&self, k: &Q) -> Option<&Self::Object>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a object

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§