Trait style_traits::values::Separator [] [src]

pub trait Separator {
    fn separator() -> &'static str;
fn parse<'i, 't, F, T, E>(
        parser: &mut Parser<'i, 't>,
        parse_one: F
    ) -> Result<Vec<T>, ParseError<'i, E>>
    where
        F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result<T, ParseError<'i, E>>
; }

A trait satisfied by the types corresponding to separators.

Required Methods

The separator string that the satisfying separator type corresponds to.

Parses a sequence of values separated by this separator.

The given closure is called repeatedly for each item in the sequence.

Successful results are accumulated in a vector.

This method returns Err(_) the first time a closure does or if the separators aren't correct.

Implementors