pub struct Query { /* private fields */ }
Expand description
JSON representation of a kairosdb query
Implementations§
source§impl Query
impl Query
sourcepub fn new(start: Time, end: Time) -> Query
pub fn new(start: Time, end: Time) -> Query
Creates a new Query
object. With a absolute or relative
start and end time.
The following example creates a query starting from the first nanosecond in our world until the first week in our world finished.
let query = Query::new(Time::Nanoseconds(1),
Time::Relative{value: 1, unit: TimeUnit::WEEKS});
pub fn add(&mut self, metric: Metric)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Query
impl<'de> Deserialize<'de> for Query
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more