pub trait ValueObjectAccessAsContainer {
    type Key: ?Sized;
    type Target;
    type Array: Array;
    type Object: Object;

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

Prelude to include needed traits Access to container values in an object

Required Associated Types§

source

type Key: ?Sized

The type for Objects

source

type Target

The target for nested lookups

source

type Array: Array

The array structure

source

type Object: Object

The object structure

Required Methods§

source

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

Tries to get an element of an object as a array

source

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

Tries to get an element of an object as a object

Object Safety§

This trait is not object safe.

Implementors§