Enum glean_ffi::TimeUnit [−][src]
#[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
Truncate to nanosecond precision.
Truncate to microsecond precision.
Truncate to millisecond precision.
Truncate to second precision.
Truncate to minute precision.
Truncate to hour precision.
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