[−][src]Struct lognplot::tsdb::Aggregation
An aggregation of observations of some type.
Fields
count: usize
Counter of the number of events. TODO: this is duplicated in the specific metrics?
timespan: TimeSpan
The timespan this aggregation is about. This is some bucket of time which groups observed measurements.
Methods
impl<V, M> Aggregation<V, M> where
M: Metrics<V> + From<V> + Clone,
[src]
M: Metrics<V> + From<V> + Clone,
pub fn new(timespan: TimeSpan, metrics: M, count: usize) -> Self
[src]
pub fn from_aggregations(aggregations: &[Aggregation<V, M>]) -> Option<Self>
[src]
Merge given aggregations into a single aggregate
pub fn update(&mut self, sample: &Observation<V>)
[src]
pub fn include(&mut self, aggregation: &Aggregation<V, M>)
[src]
Update aggregation with another aggregation
pub fn metrics(&self) -> &M
[src]
Trait Implementations
impl<V, M> From<Observation<V>> for Aggregation<V, M> where
M: Metrics<V> + From<V> + Clone,
[src]
M: Metrics<V> + From<V> + Clone,
fn from(sample: Observation<V>) -> Self
[src]
impl<'_, V, M> From<&'_ Aggregation<V, M>> for Aggregation<V, M> where
M: Metrics<V> + From<V> + Clone,
[src]
M: Metrics<V> + From<V> + Clone,
fn from(reference: &Aggregation<V, M>) -> Self
[src]
impl<V: Clone, M: Clone> Clone for Aggregation<V, M> where
M: Metrics<V> + From<V>,
[src]
M: Metrics<V> + From<V>,
fn clone(&self) -> Aggregation<V, M>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<V: Debug, M: Debug> Debug for Aggregation<V, M> where
M: Metrics<V> + From<V>,
[src]
M: Metrics<V> + From<V>,
Auto Trait Implementations
impl<V, M> Send for Aggregation<V, M> where
M: Send,
V: Send,
M: Send,
V: Send,
impl<V, M> Sync for Aggregation<V, M> where
M: Sync,
V: Sync,
M: Sync,
V: Sync,
impl<V, M> Unpin for Aggregation<V, M> where
M: Unpin,
V: Unpin,
M: Unpin,
V: Unpin,
impl<V, M> UnwindSafe for Aggregation<V, M> where
M: UnwindSafe,
V: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
impl<V, M> RefUnwindSafe for Aggregation<V, M> where
M: RefUnwindSafe,
V: RefUnwindSafe,
M: RefUnwindSafe,
V: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,