[][src]Struct redis_ts::TsOptions

pub struct TsOptions { /* fields omitted */ }

Options for a redis time series key. Can be used in multiple redis time series calls (CREATE, ALTER, ADD, ...). The uncompressed option will only be respected in a TS.CREATE.

Implementations

impl TsOptions[src]

TsOptions allows you to build up your redis time series configuration. It supports default and a builder pattern so you can use it the following way:

use redis_ts::TsOptions;
 
let opts:TsOptions = TsOptions::default()
    .retention_time(60000)
    .uncompressed(false)
    .label("label_1", "value_1")
    .label("label_2", "value_2");

pub fn retention_time(self, time: u64) -> Self[src]

Specifies the retention time in millis for this time series options.

pub fn uncompressed(self, value: bool) -> Self[src]

Switches this time series into uncompressed mode. Note that redis ts only respects this flag in TS.CREATE. All other options usages will ignore this flag.

pub fn labels(self, labels: Vec<(&str, &str)>) -> Self[src]

Resets all labels to the items in given labels. All labels that where previously present will be removed. If the labels are empty no labels will be used for the time series.

pub fn label(self, name: &str, value: &str) -> Self[src]

Adds a single label to this time series options.

Trait Implementations

impl Clone for TsOptions[src]

impl Debug for TsOptions[src]

impl Default for TsOptions[src]

impl ToRedisArgs for TsOptions[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.