#[repr(i32)]
pub enum TimeUnit {
Nanosecond,
Microsecond,
Millisecond,
Second,
Minute,
Hour,
Day,
}
Expand description
Different resolutions supported by the time related metric types (e.g. DatetimeMetric).
Variants
Nanosecond
Truncate to nanosecond precision.
Microsecond
Truncate to microsecond precision.
Millisecond
Truncate to millisecond precision.
Second
Truncate to second precision.
Minute
Truncate to minute precision.
Hour
Truncate to hour precision.
Day
Truncate to day precision.
Implementations
Formats the given time unit, truncating the time if needed.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<TimeUnit, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<TimeUnit, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Trait implementation for converting an integer value to a TimeUnit.
This is used in the FFI code.
Please note that values should match the ordering of the platform specific side of things (e.g. Kotlin implementation).
Auto Trait Implementations
impl RefUnwindSafe for TimeUnit
impl UnwindSafe for TimeUnit
Blanket Implementations
Mutably borrows from an owned value. Read more