[][src]Trait combine::error::StreamError

pub trait StreamError<Item, Range>: Sized {
    pub fn unexpected_token(token: Item) -> Self;
pub fn unexpected_range(token: Range) -> Self;
pub fn unexpected_format<T>(msg: T) -> Self
    where
        T: Display
;
pub fn expected_token(token: Item) -> Self;
pub fn expected_range(token: Range) -> Self;
pub fn expected_format<T>(msg: T) -> Self
    where
        T: Display
;
pub fn message_token(token: Item) -> Self;
pub fn message_range(token: Range) -> Self;
pub fn message_format<T>(msg: T) -> Self
    where
        T: Display
;
pub fn is_unexpected_end_of_input(&self) -> bool;
pub fn into_other<T>(self) -> T
    where
        T: StreamError<Item, Range>
; pub fn unexpected<E>(info: E) -> Self
    where
        E: for<'s> ErrorInfo<'s, Item, Range>
, { ... }
pub fn unexpected_static_message(msg: &'static str) -> Self { ... }
pub fn expected<E>(info: E) -> Self
    where
        E: for<'s> ErrorInfo<'s, Item, Range>
, { ... }
pub fn expected_static_message(msg: &'static str) -> Self { ... }
pub fn message_static_message(msg: &'static str) -> Self { ... }
pub fn message<E>(info: E) -> Self
    where
        E: for<'s> ErrorInfo<'s, Item, Range>
, { ... }
pub fn other<E>(err: E) -> Self
    where
        E: StdError + Send + Sync + 'static
, { ... }
pub fn end_of_input() -> Self { ... } }

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

pub fn unexpected_token(token: Item) -> Self[src]

pub fn unexpected_range(token: Range) -> Self[src]

pub fn unexpected_format<T>(msg: T) -> Self where
    T: Display
[src]

pub fn expected_token(token: Item) -> Self[src]

pub fn expected_range(token: Range) -> Self[src]

pub fn expected_format<T>(msg: T) -> Self where
    T: Display
[src]

pub fn message_token(token: Item) -> Self[src]

pub fn message_range(token: Range) -> Self[src]

pub fn message_format<T>(msg: T) -> Self where
    T: Display
[src]

pub fn is_unexpected_end_of_input(&self) -> bool[src]

pub fn into_other<T>(self) -> T where
    T: StreamError<Item, Range>, 
[src]

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.

Loading content...

Provided methods

pub fn unexpected<E>(info: E) -> Self where
    E: for<'s> ErrorInfo<'s, Item, Range>, 
[src]

pub fn unexpected_static_message(msg: &'static str) -> Self[src]

pub fn expected<E>(info: E) -> Self where
    E: for<'s> ErrorInfo<'s, Item, Range>, 
[src]

pub fn expected_static_message(msg: &'static str) -> Self[src]

pub fn message_static_message(msg: &'static str) -> Self[src]

pub fn message<E>(info: E) -> Self where
    E: for<'s> ErrorInfo<'s, Item, Range>, 
[src]

pub fn other<E>(err: E) -> Self where
    E: StdError + Send + Sync + 'static, 
[src]

pub fn end_of_input() -> Self[src]

Loading content...

Implementors

impl<Item, Range> StreamError<Item, Range> for StringStreamError[src]

impl<Item, Range> StreamError<Item, Range> for UnexpectedParse[src]

impl<Item, Range> StreamError<Item, Range> for combine::stream::easy::Error<Item, Range> where
    Item: PartialEq,
    Range: PartialEq
[src]

This is supported on crate feature std only.

impl<Item, Range> StreamError<Item, Range> for combine::stream::read::Error[src]

This is supported on crate feature std only.
Loading content...