[−][src]Struct async_resol_vbus::LiveDataRecordingReader
A RecordingReader
for type 0x88 live data recordings.
Examples
use resol_vbus::{FileListReader, LiveDataRecordingReader}; let files: Vec<_> = std::env::args().skip(1).collect(); let flr = FileListReader::new(files); let mut ldrr = LiveDataRecordingReader::new(flr); while let Some(data) = ldrr.read_data().unwrap() { // process the data println!("{}: {}", data.as_header().timestamp, data.id_string()); }
Methods
impl<T> LiveDataRecordingReader<T> where
T: Read,
[src]
T: Read,
pub fn new(reader: T) -> LiveDataRecordingReader<T>
[src]
Construct a new LiveDataRecordingReader<T>
instance.
pub fn set_min_max_timestamps(
&mut self,
min_timestamp: Option<DateTime<Utc>>,
max_timestamp: Option<DateTime<Utc>>
)
[src]
&mut self,
min_timestamp: Option<DateTime<Utc>>,
max_timestamp: Option<DateTime<Utc>>
)
Set optional minimum and maximum timestamps for prefiltering data.
pub fn read_topology_data_set(&mut self) -> Result<DataSet, Error>
[src]
Quickly read to EOF of the source and return the DataSet for all uniquely found Data
variants.
pub fn read_data(&mut self) -> Result<Option<Data>, Error>
[src]
Read from the stream until a valid Data
variant can be decoded.
pub fn read_to_stats(&mut self) -> Result<LiveDataRecordingStats, Error>
[src]
Quickly read to EOF of the source and return the LiveDataRecordingStats
.
pub fn offset(&self) -> usize
[src]
Get amount of already consumed bytes.
Trait Implementations
impl<T> Debug for LiveDataRecordingReader<T> where
T: Read + Debug,
[src]
T: Read + Debug,
Auto Trait Implementations
impl<T> RefUnwindSafe for LiveDataRecordingReader<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for LiveDataRecordingReader<T> where
T: Send,
T: Send,
impl<T> Sync for LiveDataRecordingReader<T> where
T: Sync,
T: Sync,
impl<T> Unpin for LiveDataRecordingReader<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for LiveDataRecordingReader<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,