pub enum SleepError {
NotANumber,
Negative,
TooLarge,
}Expand description
Why a requested sleep length cannot be carried by an OS call.
The caller picks the Python-level consequence: time.sleep raises
(ValueError for the first two, OverflowError for the third) while
asyncio.sleep raises only for NaN and clamps the rest, as CPython does.
Variants§
NotANumber
The delay was NaN.
Negative
The delay was negative.
TooLarge
The delay was past MAX_SLEEP_SECONDS (infinity included).
Trait Implementations§
Source§impl Clone for SleepError
impl Clone for SleepError
impl Copy for SleepError
Source§impl Debug for SleepError
impl Debug for SleepError
impl Eq for SleepError
Source§impl PartialEq for SleepError
impl PartialEq for SleepError
impl StructuralPartialEq for SleepError
Auto Trait Implementations§
impl Freeze for SleepError
impl RefUnwindSafe for SleepError
impl Send for SleepError
impl Sync for SleepError
impl Unpin for SleepError
impl UnsafeUnpin 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