Enum ess::parser::ParseResult
source · pub enum ParseResult<'a, T, E> {
Done(&'a str, T),
Error(E),
}
Expand description
Represents what to do next in partially completed parsing.
ParseResult
is returned from all intermediate parsers. If you just want to
get back parsed s-expressions, you won’t need to worry about this type since
the top level parsers just return a Result
.
If the parser failed to produce a result, it will return Error
, and if it
succeeded we’ll get the Done
variant containing the value produced and the
rest of the text to work on.
Variants§
Done(&'a str, T)
The parser succeeded, this contains first the un-consumed portion of the input then the result produced by parsing.
Error(E)
The parser failed, the E
represents the reason for the failure.
Trait Implementations§
source§impl<'a, T: Clone, E: Clone> Clone for ParseResult<'a, T, E>
impl<'a, T: Clone, E: Clone> Clone for ParseResult<'a, T, E>
source§fn clone(&self) -> ParseResult<'a, T, E>
fn clone(&self) -> ParseResult<'a, T, E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more