[][src]Type Definition combine::stream::StreamErrorFor

type StreamErrorFor<Input> = <<Input as StreamOnce>::Error as ParseError<<Input as StreamOnce>::Token, <Input as StreamOnce>::Range, <Input as StreamOnce>::Position>>::StreamError;

Convenience alias over the StreamError for the input stream Input

#[macro_use]
extern crate combine;
use combine::{easy, Parser, Stream, many1};
use combine::parser::char::letter;
use combine::stream::StreamErrorFor;
use combine::error::{ParseError, StreamError};

parser!{
   fn parser[Input]()(Input) -> String
    where [ Input: Stream<Token = char>, ]
    {
        many1(letter()).and_then(|word: String| {
            if word == "combine" {
                Ok(word)
            } else {
                // The alias makes it easy to refer to the `StreamError` type of `Input`
                Err(StreamErrorFor::<Input>::expected_static_message("combine"))
            }
        })
    }
}

fn main() {
}