pub enum ParseTimeBucketError {
Empty,
MissingNumber {
spec: String,
},
MissingUnit {
spec: String,
},
InvalidNumber {
spec: String,
source: ParseIntError,
},
NonPositive {
spec: String,
value: u64,
},
TooLarge {
spec: String,
value: u64,
},
UnknownUnit {
spec: String,
unit: String,
},
}Expand description
Errors produced when parsing a human-friendly time bucket spec (e.g. 1h).
Variants§
Empty
The spec string was empty or only whitespace.
MissingNumber
The spec did not include a numeric value.
MissingUnit
The spec did not include a required unit suffix.
InvalidNumber
The numeric portion of the spec failed to parse.
Fields
§
source: ParseIntErrorThe parse error returned by u64::from_str.
NonPositive
The parsed numeric value was zero.
TooLarge
The parsed numeric value did not fit in a u32.
UnknownUnit
The spec used an unsupported unit suffix.
Trait Implementations§
Source§impl Debug for ParseTimeBucketError
impl Debug for ParseTimeBucketError
Source§impl Display for ParseTimeBucketError
impl Display for ParseTimeBucketError
Source§impl Error for ParseTimeBucketError
impl Error for ParseTimeBucketError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for ParseTimeBucketError
impl ErrorCompat for ParseTimeBucketError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl PartialEq for ParseTimeBucketError
impl PartialEq for ParseTimeBucketError
impl Eq for ParseTimeBucketError
impl StructuralPartialEq for ParseTimeBucketError
Auto Trait Implementations§
impl Freeze for ParseTimeBucketError
impl RefUnwindSafe for ParseTimeBucketError
impl Send for ParseTimeBucketError
impl Sync for ParseTimeBucketError
impl Unpin for ParseTimeBucketError
impl UnsafeUnpin for ParseTimeBucketError
impl UnwindSafe for ParseTimeBucketError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more