pub struct TestUpdateAlgorithm { /* private fields */ }
Expand description
An UpdateAlgorithm that is backed up by the samples, set up by a test.
This implementation allows other crates and integration tests to use an implementation of
UpdateAlgorithm
.
Implementations§
Trait Implementations§
Source§impl UpdateAlgorithm for TestUpdateAlgorithm
impl UpdateAlgorithm for TestUpdateAlgorithm
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,
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,
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 = BootInstant> + 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 = BootInstant> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the reference time at which the next sample may be produced. Read more
Auto Trait Implementations§
impl !Freeze for TestUpdateAlgorithm
impl !RefUnwindSafe for TestUpdateAlgorithm
impl Send for TestUpdateAlgorithm
impl Sync for TestUpdateAlgorithm
impl Unpin for TestUpdateAlgorithm
impl UnwindSafe for TestUpdateAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more