Struct lowcharts::plot::TimeHistogram
source · [−]pub struct TimeHistogram { /* private fields */ }Expand description
A struct holding data to plot a TimeHistogram of timestamp data.
Implementations
sourceimpl TimeHistogram
impl TimeHistogram
sourcepub fn new(size: usize, ts: &[DateTime<FixedOffset>]) -> TimeHistogram
pub fn new(size: usize, ts: &[DateTime<FixedOffset>]) -> TimeHistogram
Creates a Histogram from a vector of DateTime elements.
size is the number of histogram buckets to display.
sourcepub fn load(&mut self, vec: &[DateTime<FixedOffset>])
pub fn load(&mut self, vec: &[DateTime<FixedOffset>])
Add to the TimeHistogram data the values of a slice of DateTime
elements. Elements not in the initial range (the one passed to new)
will be silently discarded.
sourcepub fn add(&mut self, ts: DateTime<FixedOffset>)
pub fn add(&mut self, ts: DateTime<FixedOffset>)
Add to the TimeHistogram another DateTime element. If element is not
in the initial range (the one passed to new), it will be silently
discarded.
Trait Implementations
sourceimpl Debug for TimeHistogram
impl Debug for TimeHistogram
Auto Trait Implementations
impl RefUnwindSafe for TimeHistogram
impl Send for TimeHistogram
impl Sync for TimeHistogram
impl Unpin for TimeHistogram
impl UnwindSafe for TimeHistogram
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more