Enum uom::str::ParseQuantityError
source · pub enum ParseQuantityError {
NoSeparator,
ValueParseError,
UnknownUnit,
}
Expand description
Represents an error encountered while parsing a string into a Quantity
.
Variants§
NoSeparator
No separators (spaces) were encountered.
ValueParseError
An error occurred while parsing the value (first) portion of the string.
Due to exhaustiveness and type system limitations, this variant does not encode the underlying parse error.
UnknownUnit
The unit used wasn’t found for this quantity.
Notes
For now, only abbreviations are supported, so this error may be encountered even if the unit name (description) is correct.
Trait Implementations§
source§impl Clone for ParseQuantityError
impl Clone for ParseQuantityError
source§fn clone(&self) -> ParseQuantityError
fn clone(&self) -> ParseQuantityError
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 ParseQuantityError
impl Debug for ParseQuantityError
source§impl Display for ParseQuantityError
impl Display for ParseQuantityError
source§impl Error for ParseQuantityError
impl Error for ParseQuantityError
1.30.0 · 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 PartialEq<ParseQuantityError> for ParseQuantityError
impl PartialEq<ParseQuantityError> for ParseQuantityError
source§fn eq(&self, other: &ParseQuantityError) -> bool
fn eq(&self, other: &ParseQuantityError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.