[−][src]Trait combine::error::StreamError
StreamError
represents a single error returned from a Stream
or a Parser
.
Usually multiple instances of StreamError
is composed into a ParseError
to build the final
error value.
Required methods
fn unexpected_token(token: Item) -> Self
fn unexpected_range(token: Range) -> Self
fn unexpected_message<T>(msg: T) -> Self where
T: Display,
T: Display,
fn expected_token(token: Item) -> Self
fn expected_range(token: Range) -> Self
fn expected_message<T>(msg: T) -> Self where
T: Display,
T: Display,
fn message_token(token: Item) -> Self
fn message_range(token: Range) -> Self
fn message_message<T>(msg: T) -> Self where
T: Display,
T: Display,
fn into_other<T>(self) -> T where
T: StreamError<Item, Range>,
T: StreamError<Item, Range>,
Converts self
into a different StreamError
type.
This should aim to preserve as much information as possible into the returned T
value but
if Self
ignores some information passed to it using one of the constructors that
information is naturally lost.
Provided methods
fn unexpected(info: Info<Item, Range>) -> Self
fn unexpected_static_message(msg: &'static str) -> Self
fn expected(info: Info<Item, Range>) -> Self
fn expected_static_message(msg: &'static str) -> Self
fn message_static_message(msg: &'static str) -> Self
fn message(info: Info<Item, Range>) -> Self
fn other<E>(err: E) -> Self where
E: StdError + Send + Sync + 'static,
E: StdError + Send + Sync + 'static,
fn end_of_input() -> Self
Implementors
impl<Item, Range> StreamError<Item, Range> for StringStreamError
[src]
fn unexpected_token(_: Item) -> Self
[src]
fn unexpected_range(_: Range) -> Self
[src]
fn unexpected_message<T>(_msg: T) -> Self where
T: Display,
[src]
T: Display,
fn expected_token(_: Item) -> Self
[src]
fn expected_range(_: Range) -> Self
[src]
fn expected_message<T>(_: T) -> Self where
T: Display,
[src]
T: Display,
fn message_message<T>(_: T) -> Self where
T: Display,
[src]
T: Display,
fn message_token(_: Item) -> Self
[src]
fn message_range(_: Range) -> Self
[src]
fn message_static_message(msg: &'static str) -> Self
[src]
fn end_of_input() -> Self
[src]
fn into_other<T>(self) -> T where
T: StreamError<Item, Range>,
[src]
T: StreamError<Item, Range>,
fn unexpected(info: Info<Item, Range>) -> Self
[src]
fn unexpected_static_message(msg: &'static str) -> Self
[src]
fn expected(info: Info<Item, Range>) -> Self
[src]
fn expected_static_message(msg: &'static str) -> Self
[src]
fn message(info: Info<Item, Range>) -> Self
[src]
fn other<E>(err: E) -> Self where
E: StdError + Send + Sync + 'static,
[src]
E: StdError + Send + Sync + 'static,
impl<Item, Range> StreamError<Item, Range> for UnexpectedParse
[src]
fn unexpected_token(_: Item) -> Self
[src]
fn unexpected_range(_: Range) -> Self
[src]
fn unexpected_message<T>(_: T) -> Self where
T: Display,
[src]
T: Display,
fn expected_token(_: Item) -> Self
[src]
fn expected_range(_: Range) -> Self
[src]
fn expected_message<T>(_: T) -> Self where
T: Display,
[src]
T: Display,
fn message_message<T>(_: T) -> Self where
T: Display,
[src]
T: Display,
fn message_token(_: Item) -> Self
[src]
fn message_range(_: Range) -> Self
[src]
fn end_of_input() -> Self
[src]
fn into_other<T>(self) -> T where
T: StreamError<Item, Range>,
[src]
T: StreamError<Item, Range>,
fn unexpected(info: Info<Item, Range>) -> Self
[src]
fn unexpected_static_message(msg: &'static str) -> Self
[src]
fn expected(info: Info<Item, Range>) -> Self
[src]
fn expected_static_message(msg: &'static str) -> Self
[src]
fn message_static_message(msg: &'static str) -> Self
[src]
fn message(info: Info<Item, Range>) -> Self
[src]
fn other<E>(err: E) -> Self where
E: StdError + Send + Sync + 'static,
[src]
E: StdError + Send + Sync + 'static,
impl<Item, Range> StreamError<Item, Range> for Error<Item, Range> where
Item: PartialEq,
Range: PartialEq,
[src]
Item: PartialEq,
Range: PartialEq,
fn unexpected_token(token: Item) -> Self
[src]
fn unexpected_range(token: Range) -> Self
[src]
fn unexpected_message<T>(msg: T) -> Self where
T: Display,
[src]
T: Display,
fn unexpected_static_message(msg: &'static str) -> Self
[src]
fn expected_token(token: Item) -> Self
[src]
fn expected_range(token: Range) -> Self
[src]
fn expected_message<T>(msg: T) -> Self where
T: Display,
[src]
T: Display,
fn expected_static_message(msg: &'static str) -> Self
[src]
fn message_message<T>(msg: T) -> Self where
T: Display,
[src]
T: Display,
fn message_static_message(msg: &'static str) -> Self
[src]
fn message_token(token: Item) -> Self
[src]
fn message_range(token: Range) -> Self
[src]
fn other<E>(err: E) -> Self where
E: StdError + Send + Sync + 'static,
[src]
E: StdError + Send + Sync + 'static,
fn into_other<T>(self) -> T where
T: StreamError<Item, Range>,
[src]
T: StreamError<Item, Range>,