pub trait LogSourceAsyncExt: LogSourceAsync {
// Provided methods
fn latest_sensor<T: SensorData>(
&mut self,
) -> impl Future<Output = Result<Option<(EntryHeader, T)>, Error>> { ... }
fn oldest_sensor<T: SensorData>(
&mut self,
) -> impl Future<Output = Result<Option<(EntryHeader, T)>, Error>> { ... }
fn count_sensor<T: SensorData>(
&mut self,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn query_sensor<T: SensorData, C>(
&mut self,
t_start: u64,
t_end: u64,
callback: C,
) -> impl Future<Output = Result<u32, Error>>
where C: FnMut(&EntryHeader, &T) -> bool { ... }
fn query_all_sensor<T: SensorData, C>(
&mut self,
callback: C,
) -> impl Future<Output = Result<u32, Error>>
where C: FnMut(&EntryHeader, &T) -> bool { ... }
}Expand description
Async mirror of LogSourceExt, with the same payload-size contract.
Provided Methods§
Sourcefn latest_sensor<T: SensorData>(
&mut self,
) -> impl Future<Output = Result<Option<(EntryHeader, T)>, Error>>
fn latest_sensor<T: SensorData>( &mut self, ) -> impl Future<Output = Result<Option<(EntryHeader, T)>, Error>>
The most recent value for a sensor type.
Sourcefn oldest_sensor<T: SensorData>(
&mut self,
) -> impl Future<Output = Result<Option<(EntryHeader, T)>, Error>>
fn oldest_sensor<T: SensorData>( &mut self, ) -> impl Future<Output = Result<Option<(EntryHeader, T)>, Error>>
The oldest retained value for a sensor type.
Sourcefn count_sensor<T: SensorData>(
&mut self,
) -> impl Future<Output = Result<u32, Error>>
fn count_sensor<T: SensorData>( &mut self, ) -> impl Future<Output = Result<u32, Error>>
Entries retained for a sensor type.
Sourcefn query_sensor<T: SensorData, C>(
&mut self,
t_start: u64,
t_end: u64,
callback: C,
) -> impl Future<Output = Result<u32, Error>>
fn query_sensor<T: SensorData, C>( &mut self, t_start: u64, t_end: u64, callback: C, ) -> impl Future<Output = Result<u32, Error>>
Values for a sensor type whose timestamp lies in [t_start, t_end].
Sourcefn query_all_sensor<T: SensorData, C>(
&mut self,
callback: C,
) -> impl Future<Output = Result<u32, Error>>
fn query_all_sensor<T: SensorData, C>( &mut self, callback: C, ) -> impl Future<Output = Result<u32, Error>>
Every retained value for a sensor type, in log order.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".