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
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)