[][src]Enum combine::stream::easy::Info

pub enum Info<T, R> {
    Token(T),
    Range(R),
    Owned(String),
    Static(&'static str),
}
This is supported on crate feature std only.

Enum holding error information. Variants are defined for Stream::Token and Stream::Range as well as string variants holding easy descriptions.

As there is implementations of From for String and &'static str the constructor need not be used directly as calling msg.into() should turn a message into the correct Info variant.

Variants

Token(T)
Range(R)
Owned(String)
Static(&'static str)

Implementations

impl<T, R> Info<T, R>[src]

pub fn map_token<F, U>(self, f: F) -> Info<U, R> where
    F: FnOnce(T) -> U, 
[src]

pub fn map_range<F, S>(self, f: F) -> Info<T, S> where
    F: FnOnce(R) -> S, 
[src]

Trait Implementations

impl<T: Clone, R: Clone> Clone for Info<T, R>[src]

impl<T: Debug, R: Debug> Debug for Info<T, R>[src]

impl<T: Display, R: Display> Display for Info<T, R>[src]

impl<T, R> From<&'static str> for Info<T, R>[src]

impl<T, R, F> From<Info<T, R, F>> for Info<T, R> where
    F: Display
[src]

impl<T, R> From<String> for Info<T, R>[src]

impl<R> From<char> for Info<char, R>[src]

impl<R> From<u8> for Info<u8, R>[src]

impl<T: PartialEq, R: PartialEq> PartialEq<Info<T, R>> for Info<T, R>[src]

Auto Trait Implementations

impl<T, R> RefUnwindSafe for Info<T, R> where
    R: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T, R> Send for Info<T, R> where
    R: Send,
    T: Send
[src]

impl<T, R> Sync for Info<T, R> where
    R: Sync,
    T: Sync
[src]

impl<T, R> Unpin for Info<T, R> where
    R: Unpin,
    T: Unpin
[src]

impl<T, R> UnwindSafe for Info<T, R> where
    R: UnwindSafe,
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.