Enum pear::ParseResult [−][src]
pub enum ParseResult<I: Input, R> { Done(R), Error(ParseError<I>), }
Variants
Done(R)
Error(ParseError<I>)
Methods
impl<I: Input, R> ParseResult<I, R>
[src]
impl<I: Input, R> ParseResult<I, R>
pub fn unwrap(self) -> R
[src]
pub fn unwrap(self) -> R
pub fn map<U, F: FnOnce(R) -> U>(self, f: F) -> Result<U, ParseError<I>>
[src]
pub fn map<U, F: FnOnce(R) -> U>(self, f: F) -> Result<U, ParseError<I>>
pub fn ok(self) -> Option<R>
[src]
pub fn ok(self) -> Option<R>
Trait Implementations
impl<I: Debug + Input, R: Debug> Debug for ParseResult<I, R>
[src]
impl<I: Debug + Input, R: Debug> Debug for ParseResult<I, R>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I: Input, T, E: Display> From<Result<T, E>> for ParseResult<I, T>
[src]
impl<I: Input, T, E: Display> From<Result<T, E>> for ParseResult<I, T>
fn from(result: Result<T, E>) -> ParseResult<I, T>
[src]
fn from(result: Result<T, E>) -> ParseResult<I, T>
Performs the conversion.
impl<I: Input, R> Into<Result<R, ParseError<I>>> for ParseResult<I, R>
[src]
impl<I: Input, R> Into<Result<R, ParseError<I>>> for ParseResult<I, R>
fn into(self) -> Result<R, ParseError<I>>
[src]
fn into(self) -> Result<R, ParseError<I>>
Performs the conversion.