pub struct StatisticTime {
intervals: u32,
}
Expand description
The timestamp for a statistic
This timestamp is generally represented as the start of the period it
represents as an RFC3339/ISO8601 string (with the date, time with second
precision, and time zone Z
for UTC), e.g. 2022-10-01T16:30:00Z
Internally, this stores the number of 15 minute periods since the beginning of the year 2000 UTC (e.g. on 2000-01-01 the period between 00:00:00.000 and 00:14:59.999 UTC is 0 and 15:30:00.000 to 15:44:59.999 UTC is 62)
Fields§
§intervals: u32
Implementations§
Source§impl StatisticTime
impl StatisticTime
Sourcepub const EPOCH: OffsetDateTime
pub const EPOCH: OffsetDateTime
The datetime representing the beginning of 0
in StatisticTime
Sourcepub const RESOLUTION_SECS: i64 = 900i64
pub const RESOLUTION_SECS: i64 = 900i64
The resolution of a StatisticTime
(15 minutes) in seconds
Sourcepub fn now() -> Self
pub fn now() -> Self
Get the StatisticTime
for now (the current time)
Trait Implementations§
Source§impl Clone for StatisticTime
impl Clone for StatisticTime
Source§fn clone(&self) -> StatisticTime
fn clone(&self) -> StatisticTime
Returns a copy 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 StatisticTime
impl Debug for StatisticTime
Source§impl<'de> Deserialize<'de> for StatisticTime
impl<'de> Deserialize<'de> for StatisticTime
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 Display for StatisticTime
impl Display for StatisticTime
Source§impl From<OffsetDateTime> for StatisticTime
impl From<OffsetDateTime> for StatisticTime
Source§impl From<StatisticTime> for OffsetDateTime
impl From<StatisticTime> for OffsetDateTime
Source§fn from(st: StatisticTime) -> OffsetDateTime
fn from(st: StatisticTime) -> OffsetDateTime
Converts to this type from the input type.
Source§impl From<StatisticTime> for String
impl From<StatisticTime> for String
Source§fn from(st: StatisticTime) -> Self
fn from(st: StatisticTime) -> Self
Converts to this type from the input type.
Source§impl FromStr for StatisticTime
impl FromStr for StatisticTime
Source§impl Hash for StatisticTime
impl Hash for StatisticTime
Source§impl PartialEq for StatisticTime
impl PartialEq for StatisticTime
Source§impl Serialize for StatisticTime
impl Serialize for StatisticTime
Source§impl TryFrom<&str> for StatisticTime
impl TryFrom<&str> for StatisticTime
impl Copy for StatisticTime
impl Eq for StatisticTime
impl StructuralPartialEq for StatisticTime
Auto Trait Implementations§
impl Freeze for StatisticTime
impl RefUnwindSafe for StatisticTime
impl Send for StatisticTime
impl Sync for StatisticTime
impl Unpin for StatisticTime
impl UnwindSafe for StatisticTime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request