[][src]Function combine::one_of

pub fn one_of<T, Input>(tokens: T) -> OneOf<T, Input> where
    T: Clone + IntoIterator,
    Input: Stream,
    Input::Token: PartialEq<T::Item>, 

Extract one token and succeeds if it is part of tokens.

let result = many(one_of("abc".chars()))
    .parse("abd");
assert_eq!(result, Ok((String::from("ab"), "d")));