Enum parser_combinators::primitives::Info [] [src]

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

Enum holding error information As there is implementations of From for T: Positioner, 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)Owned(String)Borrowed(&'static str)

Trait Implementations

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

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

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

fn clone(&self) -> Info<T>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

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

fn eq(&self, other: &Info<T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

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

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Positioner> From<T> for Info<T>
[src]

fn from(s: T) -> Info<T>

Performs the conversion.

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

fn from(s: String) -> Info<T>

Performs the conversion.

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

fn from(s: &'static str) -> Info<T>

Performs the conversion.