Trait pull_source::UpdateAlgorithm
source · 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§
sourcefn 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 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.
sourcefn 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 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
.