influx_client/flux/
mod.rs

1//! This module provides the types to read from and write into buckets.
2//! However, the query language `flux` is not fully supported yet.
3
4pub mod functions;
5mod read_query;
6mod write_query;
7
8use std::fmt::Display;
9
10pub use read_query::ReadQuery;
11pub use write_query::WriteQuery;
12
13#[allow(non_camel_case_types)]
14pub enum Precision {
15    h,
16    s,
17    ms,
18    us,
19    ns,
20}
21
22impl Display for Precision {
23    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24        write!(
25            f,
26            "{}",
27            match self {
28                Precision::h => "h",
29                Precision::s => "s",
30                Precision::ms => "ms",
31                Precision::us => "us",
32                Precision::ns => "ns",
33            }
34        )
35    }
36}