Trait libquery::ValueSrc
[−]
[src]
pub trait ValueSrc: InTimeInterval { fn value(&self, ident: &Ident) -> Option<Value>; fn stats(&self) -> &Stats; }
A trait to extract values out of flow slices.
Required Methods
fn value(&self, ident: &Ident) -> Option<Value>
Extracts the given column.
Note that the caller must first check the container (with the
PreFilter
with the relevant query and must not
ask for columns that are not accepted by the container (eg. if the container said
MissingColumns
. It is OK for the implementation to panic if it does.
If the implementation signaled MayUse
and it is missing some values in some flows
(because they are optional), it shall produce empty set inside the value.
Some implementation may produce multiple values if they have pre-aggregated input data. It
must not happen to columns requested to aggregate by in the relevant PreFilter
query.
fn stats(&self) -> &Stats
Provides the statistics.
This provides the statistics (eg. sizes, speeds, etc) of the flow slice.