Struct resol_vbus::RecordingReader[][src]

pub struct RecordingReader<R: Read> { /* fields omitted */ }
Expand description

Allows reading Data variants from a Read trait object.

Examples

use resol_vbus::{FileListReader, RecordingReader};

let files: Vec<_> = std::env::args().skip(1).collect();

let flr = FileListReader::new(files);

let mut rr = RecordingReader::new(flr);

while let Some(data_set) = rr.read_data_set().unwrap() {
    // process the data set
    println!("{}:", data_set.timestamp);

    for data in data_set.iter() {
        println!("  - {}", data.id_string());
    }
}

Implementations

Constructs a RecordingReader.

Get a reference to the underlying reader.

Get a mutable reference to the underlying reader.

Set optional minimum and maximum timestamps for prefiltering data.

Read from the stream until a valid blob of data is found.

Read from the stream until a valid DataSet variant can be decoded.

Quickly read to EOF of the source and return the DataSet for all uniquely found Data variants.

Get amount of already consumed bytes.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.