pub enum TimestampOrRelative {
Timestamp(i64),
Relative(String),
}Expand description
Either a timestamp in milliseconds since epoch, or a timestamp on the form
N[timeunit]-ago where timeunit is w,d,h,m,s. Example: ‘2d-ago’
gets datapoints that are up to 2 days old. You can also specify time
in milliseconds since epoch. Note that for aggregates, the start time is rounded
down to a whole granularity unit (in UTC timezone). Daily granularities (d) are
rounded to 0:00 AM; hourly granularities (h) to the start of the hour, etc.
Variants§
Timestamp(i64)
Timestamp in milliseconds since epoch.
Relative(String)
Relative timestamp.
The format is ‘now’ or N[timeunit]-ago where timeunit is w,d,h,m,s.
Example: 2d-ago gets data that is up to two days old.
You can also specify time in milliseconds since epoch.
Trait Implementations§
Source§impl Clone for TimestampOrRelative
impl Clone for TimestampOrRelative
Source§fn clone(&self) -> TimestampOrRelative
fn clone(&self) -> TimestampOrRelative
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimestampOrRelative
impl Debug for TimestampOrRelative
Source§impl<'de> Deserialize<'de> for TimestampOrRelative
impl<'de> Deserialize<'de> for TimestampOrRelative
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
Source§impl From<&str> for TimestampOrRelative
impl From<&str> for TimestampOrRelative
Source§impl From<i64> for TimestampOrRelative
impl From<i64> for TimestampOrRelative
Auto Trait Implementations§
impl Freeze for TimestampOrRelative
impl RefUnwindSafe for TimestampOrRelative
impl Send for TimestampOrRelative
impl Sync for TimestampOrRelative
impl Unpin for TimestampOrRelative
impl UnwindSafe for TimestampOrRelative
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more