Struct resol_vbus::DataSet[][src]

pub struct DataSet {
    pub timestamp: DateTime<Utc>,
    // some fields omitted
}
Expand description

A DataSet contains a set of unique (non-identical) Data values.

Examples

use std::io::Read;

use resol_vbus::{DataSet, RecordingReader, Result};

fn print_data_ids<R: Read>(r: R) -> Result<()> {
    let mut rr = RecordingReader::new(r);

    let mut cumultative_data_set = DataSet::new();

    while let Some(data_set) = rr.read_data_set()? {
        let timestamp = data_set.timestamp;

        cumultative_data_set.add_data_set(data_set);

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

    Ok(())
}

Fields

timestamp: DateTime<Utc>

The timestamp that corresponds to the contained set of Data values.

Implementations

Construct an empty DataSet.

Construct a DataSet from a list of Data values.

Return the amount of Data values contained in this DataSet.

Return whether this DataSet is empty.

Return the Data values contained in this DataSet.

Add a Data value, replacing any identical existing one.

Add all Data values from one DataSet into another.

Remove all Data values.

Remove Data values with timestamps older than min_timestamp.

Find all Packet values and set their frame_count to zero effectively hiding their frame_data payload.

Find all Packet values with timestamps older than min_timestamp and set their frame_count to zero effectively hiding their frame_data payload.

Returns an iterator over the Data values.

Returns an iterator over the Data values.

Sort the Data values contained in this DataSet.

Sort the Data values contained in this DataSet.

Sort the Data values contained in this DataSet by a list of known PacketId values.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Creates an identification hash for this VBus data value.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.