pub enum FormulaParseError {
EmptyFormula,
EmptyPart,
EmptyGroup,
InvalidSymbol(String),
InvalidNumber(String),
ZeroCount,
ZeroMultiplier,
UnexpectedCharacter(char),
UnexpectedEnd,
UnmatchedOpenGroup,
UnmatchedCloseGroup,
TrailingSeparator,
}Expand description
Errors returned while parsing a formula string.
Variants§
EmptyFormula
The input is empty or whitespace only.
EmptyPart
A formula part has no terms.
EmptyGroup
A parenthesized group has no terms.
InvalidSymbol(String)
An element symbol does not match the supported shape.
InvalidNumber(String)
A numeric count or multiplier could not be represented.
ZeroCount
An element count was zero.
ZeroMultiplier
A group or hydrate multiplier was zero.
UnexpectedCharacter(char)
The parser encountered an unexpected character.
UnexpectedEnd
The input ended while a construct was still open.
UnmatchedOpenGroup
A group was opened but not closed.
UnmatchedCloseGroup
A closing parenthesis appeared without a matching opening parenthesis.
TrailingSeparator
A hydrate separator appeared at the end of the formula.
Trait Implementations§
Source§impl Clone for FormulaParseError
impl Clone for FormulaParseError
Source§fn clone(&self) -> FormulaParseError
fn clone(&self) -> FormulaParseError
Returns a duplicate 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 FormulaParseError
impl Debug for FormulaParseError
Source§impl Display for FormulaParseError
impl Display for FormulaParseError
Source§impl Error for FormulaParseError
impl Error for FormulaParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<FormulaValidationError> for FormulaParseError
impl From<FormulaValidationError> for FormulaParseError
Source§fn from(error: FormulaValidationError) -> Self
fn from(error: FormulaValidationError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FormulaParseError
impl PartialEq for FormulaParseError
impl Eq for FormulaParseError
impl StructuralPartialEq for FormulaParseError
Auto Trait Implementations§
impl Freeze for FormulaParseError
impl RefUnwindSafe for FormulaParseError
impl Send for FormulaParseError
impl Sync for FormulaParseError
impl Unpin for FormulaParseError
impl UnsafeUnpin for FormulaParseError
impl UnwindSafe for FormulaParseError
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