Skip to main content

PollSleeper

Trait PollSleeper 

Source
pub trait PollSleeper {
    // Required method
    fn sleep(&mut self, duration: Duration);
}
Expand description

Sleeper injection used to test bounded polling without wall-clock delay.

Required Methods§

Source

fn sleep(&mut self, duration: Duration)

Wait once between two API polls.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§