Skip to main content

VariableValues

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".

Implementations on Foreign Types§

Source§

impl VariableValues for Map<String, Value>

Available on crate feature serde_json only.
Source§

type Key = String

Source§

type Value = Value

Source§

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

Source§

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

Implementors§