simd_json::value::prelude::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§