pub trait UpdateAlgorithm {
    // Required methods
    fn update_device_properties<'life0, 'async_trait>(
        &'life0 self,
        properties: Properties
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sample<'life0, 'async_trait>(
        &'life0 self,
        urgency: Urgency
    ) -> Pin<Box<dyn Future<Output = Result<TimeSample, SampleError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn next_possible_sample_time<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Time> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

An |UpdateAlgorithm| trait produces time samples on demand.

Required Methods§

source

fn update_device_properties<'life0, 'async_trait>( &'life0 self, properties: Properties ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the algorithm’s knowledge of device properties.

source

fn sample<'life0, 'async_trait>( &'life0 self, urgency: Urgency ) -> Pin<Box<dyn Future<Output = Result<TimeSample, SampleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Produce a new time sample, taking into account Urgency.

source

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

Returns the monotonic time at which the next sample may be produced.

Implementors§