pub struct Sample {
pub timestamp: Option<f64>,
pub values: Values,
}
Expand description
A single sample in a stream. Samples may have a timestamp and one or more values.
Fields§
§timestamp: Option<f64>
The timestamp of the sample. This is optional and may be None if the stream has an irregular sampling rate, as is often the case for marker streams.
It is worth mentioning that
- clock offsets are already applied to the timestamps, should they exist
- most of the timestamps are not actually in the recording but rather calulated using the provided nominal sampling rate.
Internally, streams are recorded in “chunks”. The first sample in a chunk generally includes a timestamp while the rest are calculated.
values: Values
The values of the sample.
Trait Implementations§
Source§impl PartialOrd for Sample
impl PartialOrd for Sample
impl StructuralPartialEq for Sample
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnwindSafe for Sample
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more