[][src]Enum fungui_syntax::Info

pub enum Info<T, R> {
    Token(T),
    Range(R),
    Owned(String),
    Borrowed(&'static str),
}

Enum holding error information. Variants are defined for Stream::Item 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)Borrowed(&'static str)

Methods

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, R> From<Info<T, R>> for Info<T, R>[src]

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

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

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

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

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

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

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T, R> Send for Info<T, R> where
    R: Send,
    T: Send

impl<T, R> Sync for Info<T, R> where
    R: Sync,
    T: Sync

Blanket Implementations

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

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

type Owned = T

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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