LexerParseResult

Type Alias LexerParseResult 

Source
pub type LexerParseResult<S, T, E> = Result<Option<(S, T)>, E>;
Expand description

The return value for a Lexer parse function

This could have been defined as:

pub type LexerParseResult<L:Lexer> = Result<Option<(::State, ::Token)>, ::Error>;

But then clients that have their type L with a lifetime (which is common) would have a parse result that must be indicated by a lifetime, where the actual result does not.

This causes problems for clients

Aliased Type§

pub enum LexerParseResult<S, T, E> {
    Ok(Option<(S, T)>),
    Err(E),
}

Variants§

§1.0.0

Ok(Option<(S, T)>)

Contains the success value

§1.0.0

Err(E)

Contains the error value