chumsky::chain

Trait Chain

Source
pub trait Chain<T>: Sealed<T> {
    // Required methods
    fn len(&self) -> usize;
    fn append_to(self, v: &mut Vec<T>);
}
Expand description

A utility trait that facilitates chaining parser outputs together into Vecs.

See Parser::chain.

Required Methods§

Source

fn len(&self) -> usize

The number of items that this chain link consists of.

Source

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.

Implementations on Foreign Types§

Source§

impl Chain<char> for Option<String>

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<char>)

Source§

impl Chain<char> for String

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<char>)

Source§

impl<T> Chain<T> for Option<Vec<T>>

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<T>)

Source§

impl<T> Chain<T> for Option<T>

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<T>)

Source§

impl<T> Chain<T> for Vec<Option<T>>

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<T>)

Source§

impl<T> Chain<T> for Vec<T>

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<T>)

Source§

impl<T, A: Chain<T>> Chain<T> for (A, T)

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<T>)

Source§

impl<T, A: Chain<T>> Chain<T> for Vec<(A, T)>

Source§

fn len(&self) -> usize

Source§

fn append_to(self, v: &mut Vec<T>)

Implementors§

Source§

impl<T> Chain<T> for T