Trait Map

Source
pub trait Map {
    type Value: Value;

    // Required methods
    fn iter(&self) -> impl Iterator<Item = (&str, &Self::Value)>;
    fn get(&self, key: &str) -> Option<&Self::Value>;
    fn contains_key(&self, key: &str) -> bool;
}

Required Associated Types§

Required Methods§

Source

fn iter(&self) -> impl Iterator<Item = (&str, &Self::Value)>

Source

fn get(&self, key: &str) -> Option<&Self::Value>

Source

fn contains_key(&self, key: &str) -> bool

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.

Implementations on Foreign Types§

Source§

impl Map for Map<String, Value>

Source§

type Value = Value

Source§

fn iter(&self) -> impl Iterator<Item = (&str, &Self::Value)>

Source§

fn get(&self, key: &str) -> Option<&Self::Value>

Source§

fn contains_key(&self, key: &str) -> bool

Source§

impl Map for Table

Source§

type Value = Value

Source§

fn iter(&self) -> impl Iterator<Item = (&str, &Self::Value)>

Source§

fn get(&self, key: &str) -> Option<&Self::Value>

Source§

fn contains_key(&self, key: &str) -> bool

Source§

impl Map for Hash

Source§

type Value = Yaml

Source§

fn iter(&self) -> impl Iterator<Item = (&str, &Self::Value)>

Source§

fn get(&self, key: &str) -> Option<&Self::Value>

Source§

fn contains_key(&self, key: &str) -> bool

Implementors§