[][src]Struct async_resol_vbus::LiveDataRecordingReader

pub struct LiveDataRecordingReader<T> where
    T: Read
{ /* fields omitted */ }

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]

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]

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]

Auto Trait Implementations

impl<T> RefUnwindSafe for LiveDataRecordingReader<T> where
    T: RefUnwindSafe

impl<T> Send for LiveDataRecordingReader<T> where
    T: Send

impl<T> Sync for LiveDataRecordingReader<T> where
    T: Sync

impl<T> Unpin for LiveDataRecordingReader<T> where
    T: Unpin

impl<T> UnwindSafe for LiveDataRecordingReader<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.