Skip to main content

ObjectValue

Trait ObjectValue 

Source
pub trait ObjectValue<const CONST: bool>: Debug {
    type Key: AsRef<str> + PartialEq + Debug;
    type Value: Value<CONST, Object = Self>;
    type Iterator<'a>: Iterator<Item = (&'a Self::Key, &'a Self::Value)>
       where Self: 'a;

    // Required method
    fn iter(&self) -> Self::Iterator<'_>;
}

Required Associated Types§

Source

type Key: AsRef<str> + PartialEq + Debug

Source

type Value: Value<CONST, Object = Self>

Source

type Iterator<'a>: Iterator<Item = (&'a Self::Key, &'a Self::Value)> where Self: 'a

Required Methods§

Source

fn iter(&self) -> Self::Iterator<'_>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<const CONST: bool, K: AsRef<str> + PartialEq + Debug, V: Value<CONST, Object = Vec<(K, V)>> + Debug> ObjectValue<CONST> for Vec<(K, V)>

Source§

type Key = K

Source§

type Value = V

Source§

type Iterator<'a> = Map<Iter<'a, (K, V)>, fn(&'a (K, V)) -> (&'a K, &'a V)> where Self: 'a

Source§

fn iter(&self) -> Self::Iterator<'_>

Implementors§