#[non_exhaustive]pub enum Error {
Empty,
Unexpected(usize, char),
FractionalByte,
BadSuffix,
BadWhole(ParseIntError),
BadFractional(ParseIntError),
}
Expand description
Parsing error, as returned by
ByteUnit::from_str()
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
The input was empty.
Unexpected(usize, char)
Found unexpected character .1
at byte index .0
.
FractionalByte
A ByteUnit::B
contained a fractional component.
BadSuffix
The parsed byte unit suffix is unknown.
BadWhole(ParseIntError)
The whole part of the the number ({whole}.{frac}
) was invalid.
BadFractional(ParseIntError)
The fractional part of the the number ({whole}.{frac}
) was invalid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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