simd_json::prelude::derived

Trait ValueObjectAccessAsArray

source
pub trait ValueObjectAccessAsArray {
    type Key: ?Sized;
    type Array: Array;

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

Access to array values in an object

Required Associated Types§

source

type Key: ?Sized

The type for Objects

source

type Array: Array

The array structure

Required Methods§

source

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

Tries to get an element of an object as a array

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§