Skip to main content

Sleep

Trait Sleep 

Source
pub trait Sleep {
    // Required method
    fn sleep(&self);
}
Expand description

Platform-agnostic Sleep trait

Provides a mechanism that can be used to sleep the current thread.

Required Methods§

Source

fn sleep(&self)

Put the current thread to sleep.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§