omaha_client::time

Trait Timer

Source
pub trait Timer {
    // Required methods
    fn wait_until(
        &mut self,
        time: impl Into<PartialComplexTime>,
    ) -> BoxFuture<'static, ()>;
    fn wait_for(&mut self, duration: Duration) -> BoxFuture<'static, ()>;
}
Expand description

Trait for timers that understand how to work with the ComplexTime and PartialComplexTime types.

When using a PartialComplexTime, the trait defines Fns for waiting until any of the times have been reached, or until all of them have been reached.

Required Methods§

Source

fn wait_until( &mut self, time: impl Into<PartialComplexTime>, ) -> BoxFuture<'static, ()>

Wait until at least one of the given time bounds has been reached.

Source

fn wait_for(&mut self, duration: Duration) -> BoxFuture<'static, ()>

Wait for the given duration (from now).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§