pub enum SleepMode {
System(Duration),
CallHost,
Zero,
}Expand description
What the sleep calls do.
Variants§
System(Duration)
Cap each delay at this duration, then suspend to the host to wait without
its os handler. The host charges ResourceLimits::max_total_sleep before
waiting; waits do not count as execution time. Standard execution waits
inline without a cumulative limit. Longer delays are capped, not rejected.
CallHost
Delegate to the host’s os handler without capping or charging the delay.
Zero
Return at once without waiting.
Implementations§
Trait Implementations§
impl Copy for SleepMode
Source§impl<'de> Deserialize<'de> for SleepMode
impl<'de> Deserialize<'de> for SleepMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SleepMode
impl StructuralPartialEq for SleepMode
Auto Trait Implementations§
impl Freeze for SleepMode
impl RefUnwindSafe for SleepMode
impl Send for SleepMode
impl Sync for SleepMode
impl Unpin for SleepMode
impl UnsafeUnpin for SleepMode
impl UnwindSafe for SleepMode
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