Enum maitake::time::TimerError
source · #[non_exhaustive]pub enum TimerError {
NoGlobalTimer,
DurationTooLong {
requested: Duration,
max: Duration,
},
}
Expand description
Errors returned by Timer::try_sleep
, Timer::try_timeout
, and the
global try_sleep
and try_timeout
functions.
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.
NoGlobalTimer
No global default timer has been set.
This error is returned by the try_sleep
and try_timeout
functions only.
DurationTooLong
Fields
§
max: Duration
The maximum duration supported by this Timer
instance.
The requested Duration
exceeds the timer’s maximum duration.
This error is returned by Timer::try_sleep
, Timer::try_timeout
,
and the global try_sleep
and try_timeout
functions.
Trait Implementations§
source§impl Debug for TimerError
impl Debug for TimerError
source§impl Display for TimerError
impl Display for TimerError
source§impl Error for TimerError
Available on crate feature core-error
only.
impl Error for TimerError
Available on crate feature
core-error
only.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 for TimerError
impl PartialEq for TimerError
source§fn eq(&self, other: &TimerError) -> bool
fn eq(&self, other: &TimerError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TimerError
impl StructuralEq for TimerError
impl StructuralPartialEq for TimerError
Auto Trait Implementations§
impl RefUnwindSafe for TimerError
impl Send for TimerError
impl Sync for TimerError
impl Unpin for TimerError
impl UnwindSafe for TimerError
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