Struct rs_es::units::Duration [] [src]

pub struct Duration {
    // some fields omitted
}

A time-period unit, will be formatted into the ElasticSearch standard format

Examples

use rs_es::units::{Duration, DurationUnit};

assert_eq!("100d", Duration::new(100, DurationUnit::Day).to_string());

TODO - implement Deserialize correctly

Methods

impl Duration
[src]

Trait Implementations

impl Debug for Duration
[src]

Formats the value using the given formatter.

impl ToString for Duration
[src]

Converts the given value to a String. Read more