pub enum TimestampResolution {
Years,
Months,
Weeks,
Days,
Hours,
Minutes,
Seconds,
Milliseconds,
Microseconds,
}
Variants§
Implementations§
Source§impl TimestampResolution
impl TimestampResolution
pub fn iter_ordered() -> impl Iterator<Item = TimestampResolution>
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Method to get the string representation of the enum variant
pub fn as_u8(&self) -> u8
pub fn from_u8(value: u8) -> Self
Sourcepub fn to_duration(&self) -> Duration
pub fn to_duration(&self) -> Duration
Converts the TimestampResolution
to a Duration
.
Trait Implementations§
Source§impl Clone for TimestampResolution
impl Clone for TimestampResolution
Source§fn clone(&self) -> TimestampResolution
fn clone(&self) -> TimestampResolution
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 TimestampResolution
impl Debug for TimestampResolution
Source§impl Default for TimestampResolution
impl Default for TimestampResolution
Source§fn default() -> TimestampResolution
fn default() -> TimestampResolution
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TimestampResolution
impl<'de> Deserialize<'de> for TimestampResolution
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 TimestampResolution
impl Display for TimestampResolution
Source§impl FromStr for TimestampResolution
impl FromStr for TimestampResolution
Source§impl Hash for TimestampResolution
impl Hash for TimestampResolution
Source§impl PartialEq for TimestampResolution
impl PartialEq for TimestampResolution
Source§impl Serialize for TimestampResolution
impl Serialize for TimestampResolution
impl Copy for TimestampResolution
impl Eq for TimestampResolution
impl StructuralPartialEq for TimestampResolution
Auto Trait Implementations§
impl Freeze for TimestampResolution
impl RefUnwindSafe for TimestampResolution
impl Send for TimestampResolution
impl Sync for TimestampResolution
impl Unpin for TimestampResolution
impl UnwindSafe for TimestampResolution
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