Dictionary

Trait Dictionary 

Source
pub trait Dictionary<Vl: Value<Vl, Tx, Dc, Ls, Cm, Tp, Tg>, Tx: Text<Vl, Tx, Dc, Ls, Cm, Tp, Tg>, Dc: Dictionary<Vl, Tx, Dc, Ls, Cm, Tp, Tg>, Ls: List<Vl, Tx, Dc, Ls, Cm, Tp, Tg>, Cm: Compound<Vl, Tx, Dc, Ls, Cm, Tp, Tg>, Tp: Tuple<Vl, Tx, Dc, Ls, Cm, Tp, Tg>, Tg: Tagged<Vl, Tx, Dc, Ls, Cm, Tp, Tg>> {
    type EntryIterator<'b>: Iterator<Item = (&'b str, &'b Vl)>
       where Self: 'b,
             Vl: 'b;

    // Required methods
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;
    fn get(&self, key: &str) -> Option<&Vl>;
    fn get_mut(&mut self, key: &str) -> Option<&mut Vl>;
    fn iter(&self) -> Self::EntryIterator<'_>;
}
Expand description

A dictionary.

Required Associated Types§

Source

type EntryIterator<'b>: Iterator<Item = (&'b str, &'b Vl)> where Self: 'b, Vl: 'b

Required Methods§

Source

fn len(&self) -> usize

Number of entries in this dictionary.

Source

fn is_empty(&self) -> bool

Check if this dictionary is empty.

Source

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

Get the entry at an index.

Source

fn get_mut(&mut self, key: &str) -> Option<&mut Vl>

Get the entry at an index.

Source

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

Iterate over the entries in this dictionary.

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.

Implementors§