Skip to main content

Ticker

Trait Ticker 

Source
pub trait Ticker {
    // Required method
    fn tick(&mut self) -> bool;
}
Expand description

Drives the follow loop’s waiting, injected so tests never sleep for real: each call separates two polls and its return value decides continuation.

Required Methods§

Source

fn tick(&mut self) -> bool

Wait one poll interval. Return false to stop following — the production ticker never does; keel tail runs until interrupted.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§