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 PartialEq for ParseQuantityError
impl PartialEq 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 ==
.impl Eq for ParseQuantityError
impl StructuralPartialEq for ParseQuantityError
Auto Trait Implementations§
impl Freeze for ParseQuantityError
impl RefUnwindSafe for ParseQuantityError
impl Send for ParseQuantityError
impl Sync for ParseQuantityError
impl Unpin for ParseQuantityError
impl UnwindSafe for ParseQuantityError
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