pub struct LiveDataReader<R: Read> { /* private fields */ }
Expand description

Allows reading Data variants from a Read trait object.

Examples

use resol_vbus::{FileListReader, LiveDataReader};

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

let flr = FileListReader::new(files);

let mut ldr = LiveDataReader::new(0, flr);

while let Some(data) = ldr.read_data().unwrap() {
    // process the data
    println!("{}", data.id_string());
}

Implementations§

Constructs a LiveDataReader.

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

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

Trait Implementations§

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.