Compound

Trait Compound 

Source
pub trait Compound<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 ElementIterator<'a>: Iterator<Item = Element<&'a Vl>>
       where Self: 'a,
             Vl: 'a;

    // Required methods
    fn len(&self) -> usize;
    fn get(&self, index: usize) -> Option<Element<&Vl>>;
    fn iter(&self) -> Self::ElementIterator<'_>;
}
Expand description

A compound.

Required Associated Types§

Source

type ElementIterator<'a>: Iterator<Item = Element<&'a Vl>> where Self: 'a, Vl: 'a

Iterator over the elements in a compound.

Required Methods§

Source

fn len(&self) -> usize

Number of elements in this compound.

Source

fn get(&self, index: usize) -> Option<Element<&Vl>>

Get the element at an index.

Source

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

Iterate over the elements in this compound.

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§