pub struct UtcTimestamp(/* private fields */);Expand description
Canonical UTC timestamp with second precision for deterministic session metadata.
Implementations§
Source§impl UtcTimestamp
impl UtcTimestamp
Sourcepub fn new(value: impl Into<String>) -> Result<Self, ValidationError>
pub fn new(value: impl Into<String>) -> Result<Self, ValidationError>
Parse YYYY-MM-DDTHH:MM:SSZ and reject invalid calendar values.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consume the timestamp and return its wire representation.
Trait Implementations§
Source§impl Clone for UtcTimestamp
impl Clone for UtcTimestamp
Source§fn clone(&self) -> UtcTimestamp
fn clone(&self) -> UtcTimestamp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UtcTimestamp
impl Debug for UtcTimestamp
Source§impl<'de> Deserialize<'de> for UtcTimestamp
impl<'de> Deserialize<'de> for UtcTimestamp
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
impl Eq for UtcTimestamp
Source§impl From<UtcTimestamp> for String
impl From<UtcTimestamp> for String
Source§fn from(value: UtcTimestamp) -> Self
fn from(value: UtcTimestamp) -> Self
Converts to this type from the input type.
Source§impl FromStr for UtcTimestamp
impl FromStr for UtcTimestamp
Source§impl Hash for UtcTimestamp
impl Hash for UtcTimestamp
Source§impl Ord for UtcTimestamp
impl Ord for UtcTimestamp
Source§fn cmp(&self, other: &UtcTimestamp) -> Ordering
fn cmp(&self, other: &UtcTimestamp) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UtcTimestamp
impl PartialEq for UtcTimestamp
Source§impl PartialOrd for UtcTimestamp
impl PartialOrd for UtcTimestamp
Source§impl Serialize for UtcTimestamp
impl Serialize for UtcTimestamp
impl StructuralPartialEq for UtcTimestamp
Source§impl TryFrom<&str> for UtcTimestamp
impl TryFrom<&str> for UtcTimestamp
Auto Trait Implementations§
impl Freeze for UtcTimestamp
impl RefUnwindSafe for UtcTimestamp
impl Send for UtcTimestamp
impl Sync for UtcTimestamp
impl Unpin for UtcTimestamp
impl UnsafeUnpin for UtcTimestamp
impl UnwindSafe for UtcTimestamp
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