[][src]Enum combine::ParseResult

pub enum ParseResult<T, E> {
    ConsumedOk(T),
    EmptyOk(T),
    ConsumedErr(E),
    EmptyErr(Tracked<E>),
}

A Result type which has the consumed status flattened into the result. Conversions to and from std::result::Result can be done using result.into() or From::from(result)

Variants

ConsumedOk(T)
EmptyOk(T)
ConsumedErr(E)
EmptyErr(Tracked<E>)

Methods

impl<T, E> ParseResult<T, E>[src]

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

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

pub fn as_ref(&self) -> ParseResult<&T, &E>[src]

pub fn and_then<F, T2>(self, f: F) -> F::Output where
    F: FnOnce(T) -> ParseResult<T2, E>, 
[src]

pub fn map_err<F, E2>(self, f: F) -> ParseResult<T, F::Output> where
    F: FnOnce(E) -> E2, 
[src]

pub fn map<F, T2>(self, f: F) -> ParseResult<F::Output, E> where
    F: FnOnce(T) -> T2, 
[src]

impl<O, E> ParseResult<O, E>[src]

pub fn into_result(self) -> StdParseResult2<O, E>[src]

Trait Implementations

impl<T, E> Into<Result<Consumed<T>, Consumed<Tracked<E>>>> for ParseResult<T, E>[src]

impl<O, E> Into<Result<(O, Consumed<()>), Consumed<Tracked<E>>>> for ParseResult<O, E>[src]

impl<O, E> From<Result<(O, Consumed<()>), Consumed<Tracked<E>>>> for ParseResult<O, E>[src]

impl<T: Clone, E: Clone> Clone for ParseResult<T, E>[src]

impl<T: Copy, E: Copy> Copy for ParseResult<T, E>[src]

impl<T: PartialEq, E: PartialEq> PartialEq<ParseResult<T, E>> for ParseResult<T, E>[src]

impl<T: Debug, E: Debug> Debug for ParseResult<T, E>[src]

Auto Trait Implementations

impl<T, E> Send for ParseResult<T, E> where
    E: Send,
    T: Send

impl<T, E> Sync for ParseResult<T, E> where
    E: Sync,
    T: Sync

impl<T, E> Unpin for ParseResult<T, E> where
    E: Unpin,
    T: Unpin

impl<T, E> UnwindSafe for ParseResult<T, E> where
    E: UnwindSafe,
    T: UnwindSafe

impl<T, E> RefUnwindSafe for ParseResult<T, E> where
    E: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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