Clockable

Trait Clockable 

Source
pub trait Clockable {
    // Required methods
    fn box_clone(&self) -> Box<dyn Clockable + Send>;
    fn now(&self) -> DateTime<Utc>;
    fn now_ts(&self) -> i64;
    fn sleep<'life0, 'async_trait>(
        &'life0 self,
        seconds: i64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn box_clone(&self) -> Box<dyn Clockable + Send>

Source

fn now(&self) -> DateTime<Utc>

Source

fn now_ts(&self) -> i64

Source

fn sleep<'life0, 'async_trait>( &'life0 self, seconds: i64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Trait Implementations§

Source§

impl Clone for Box<dyn Clockable + Send>

Source§

fn clone(&self) -> Box<dyn Clockable + Send>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§