Struct resol_vbus::DataSet
[−]
[src]
pub struct DataSet { pub timestamp: DateTime<UTC>, // some fields omitted }
A DataSet
contains a set of unique Data
.
Fields
timestamp: DateTime<UTC>
The timestamp that corresponds to the contained set of Data
objects.
Methods
impl DataSet
[src]
fn new() -> DataSet
Construct an empty DataSet
.
fn from_data(timestamp: DateTime<UTC>, set: Vec<Data>) -> DataSet
Construct a DataSet
from a list of Data
objects.
fn as_data_slice(&self) -> &[Data]
Return the Data
objects contained in this DataSet
.
fn add_data(&mut self, data: Data)
Add a Data
object, replacing any equivalent existing one.
fn add_data_set(&mut self, data_set: DataSet)
Add all Data
objects from one DataSet
into another.
fn remove_data_older_than(&mut self, min_timestamp: DateTime<UTC>)
Remove Data
with timestamps older than min_timestamp
.
fn sort(&mut self)
Sort the Data
objects contained in this DataSet
.
Trait Implementations
impl Clone for DataSet
[src]
fn clone(&self) -> DataSet
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more