Trait VariableValues

Source
pub trait VariableValues {
    type Key: AsRef<str>;
    type Value: Value<true>;
    type Iterator<'a>: Iterator<Item = (&'a Self::Key, &'a Self::Value)>
       where Self: 'a;

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

    // Provided method
    fn get(&self, key: &str) -> Option<&Self::Value> { ... }
}

Required Associated Types§

Source

type Key: AsRef<str>

Source

type Value: Value<true>

Source

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

Required Methods§

Source

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

Provided Methods§

Source

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

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 VariableValues for Map<String, Value>

Source§

type Key = String

Source§

type Value = Value

Source§

type Iterator<'a> = Iter<'a>

Source§

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

Implementors§