Enum version_number::parsers::modular::ModularParserError
source · pub enum ModularParserError {
ExpectedEndOfInput {
got: u8,
},
ExpectedSeparator {
got: Option<u8>,
},
ExpectedNumericToken {
got: Option<u8>,
},
NumberError(NumberError),
}
Expand description
Errors which may be returned during parsing, by the modular parser.
Variants§
ExpectedEndOfInput
When this error variant is returned, the parser expected that no more tokens should be present, but instead 1 or more additional tokens were not parsed yet.
Fields
ExpectedSeparator
When this error variant is returned, the ‘.’ token was expected, but a different token was present, or the end-of-input reached.
The got
field shows the token read.
ExpectedNumericToken
When this error variant is returned, a numeric token was expected, but a different token was present, or the end-of-input reached.
NumberError(NumberError)
An error variant for faults when parsing and constructing a number.
Trait Implementations§
source§impl Clone for ModularParserError
impl Clone for ModularParserError
source§fn clone(&self) -> ModularParserError
fn clone(&self) -> ModularParserError
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 moresource§impl Debug for ModularParserError
impl Debug for ModularParserError
source§impl Display for ModularParserError
impl Display for ModularParserError
source§impl Error for ModularParserError
impl Error for ModularParserError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ModularParserError> for ParserError
impl From<ModularParserError> for ParserError
source§fn from(value: ModularParserError) -> Self
fn from(value: ModularParserError) -> Self
Converts to this type from the input type.
source§impl From<NumberError> for ModularParserError
impl From<NumberError> for ModularParserError
source§fn from(source: NumberError) -> Self
fn from(source: NumberError) -> Self
Converts to this type from the input type.
source§impl PartialEq for ModularParserError
impl PartialEq for ModularParserError
source§fn eq(&self, other: &ModularParserError) -> bool
fn eq(&self, other: &ModularParserError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ModularParserError
impl StructuralPartialEq for ModularParserError
Auto Trait Implementations§
impl Freeze for ModularParserError
impl RefUnwindSafe for ModularParserError
impl Send for ModularParserError
impl Sync for ModularParserError
impl Unpin for ModularParserError
impl UnwindSafe for ModularParserError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more