Trait chumsky::chain::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<T> Chain<T> for Vec<Option<T>>

source§

fn len(&self) -> usize

source§

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

source§

impl Chain<char> for String

source§

fn len(&self) -> usize

source§

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

source§

impl Chain<char> for Option<String>

source§

fn len(&self) -> usize

source§

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

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> Chain<T> for Option<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 Vec<(A, 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, A: Chain<T>> Chain<T> for (A, T)

source§

fn len(&self) -> usize

source§

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

Implementors§

source§

impl<T> Chain<T> for T