#[non_exhaustive]pub enum SleepError {
ScheduleDropped,
}
Expand description
An error returned while telling a TaskSchedule
to sleep.
Unlike regular “sleep” functions, the sleep operations on a TaskSchedule
can fail because there are no TaskHandle
s left.
Note that it is not an error if the sleep
function is interrupted,
cancelled, or or rescheduled for a later time: See TaskSchedule::sleep
for more information.
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.
ScheduleDropped
The final TaskHandle
for this TaskSchedule
has been dropped: the
task should exit.
Trait Implementations§
Source§impl Clone for SleepError
impl Clone for SleepError
Source§fn clone(&self) -> SleepError
fn clone(&self) -> SleepError
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 SleepError
impl Debug for SleepError
Source§impl Display for SleepError
impl Display for SleepError
Source§impl Error for SleepError
impl Error for SleepError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for SleepError
impl RefUnwindSafe for SleepError
impl Send for SleepError
impl Sync for SleepError
impl Unpin for SleepError
impl UnwindSafe for SleepError
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§impl<E> ErrorReport for Ewhere
E: Error + 'static,
impl<E> ErrorReport for Ewhere
E: Error + 'static,
Source§fn report(&self) -> Report<ReportHelper<'_>>
fn report(&self) -> Report<ReportHelper<'_>>
Return an object that displays the error and its causes