[][src]Function combine::one_of

pub fn one_of<T, I>(tokens: T) -> OneOf<T, I> where
    T: Clone + IntoIterator,
    I: Stream,
    I::Item: 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")));