[][src]Struct libstorage::ir::TsPoint

pub struct TsPoint {
    pub measurement: String,
    pub tags: HashMap<String, TsValue>,
    pub fields: HashMap<String, TsValue>,
    pub timestamp: Option<DateTime<Utc>>,
    pub index_field: Option<String>,
}

An intermediate representation of time series data points

Fields

measurement: Stringtags: HashMap<String, TsValue>fields: HashMap<String, TsValue>timestamp: Option<DateTime<Utc>>

This field is generally used for indexing

index_field: Option<String>

Optionally specify a field that should be used for indexing values. If not specified then the timestamp field will be used.

Methods

impl TsPoint[src]

pub fn new(measurement: &str, is_time_series: bool) -> TsPoint[src]

pub fn add_field<T: ToString>(&mut self, field: T, value: TsValue)[src]

Add a field and its value

pub fn add_tag<T: ToString>(&mut self, tag: T, value: TsValue)[src]

Add a tag and its value

pub fn set_index_field(&mut self, index_field: &str) -> MetricsResult<()>[src]

Set the field to be used for indexing if supported

pub fn set_time(self, t: DateTime<Utc>) -> Self[src]

Set the timestamp for this time point

Trait Implementations

impl Clone for TsPoint[src]

impl Debug for TsPoint[src]

Auto Trait Implementations

impl Send for TsPoint

impl Unpin for TsPoint

impl Sync for TsPoint

impl UnwindSafe for TsPoint

impl RefUnwindSafe for TsPoint

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Typeable for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self