pub struct Rfc3339Utc(/* private fields */);Expand description
Instant stored as UTC, serialized as RFC 3339.
Used for VpsRecord.added_at, ACME created_at, and any audit timestamp.
Implementations§
Source§impl Rfc3339Utc
impl Rfc3339Utc
Sourcepub fn try_new(raw: impl AsRef<str>) -> Result<Self, DomainError>
pub fn try_new(raw: impl AsRef<str>) -> Result<Self, DomainError>
Parses an external RFC 3339 string into UTC.
Sourcepub const fn as_datetime(&self) -> &DateTime<Utc>
pub const fn as_datetime(&self) -> &DateTime<Utc>
Borrows the inner UTC datetime.
Sourcepub const fn into_inner(self) -> DateTime<Utc>
pub const fn into_inner(self) -> DateTime<Utc>
Consumes into DateTime<Utc>.
Sourcepub fn to_rfc3339(&self) -> String
pub fn to_rfc3339(&self) -> String
Canonical RFC 3339 string.
Trait Implementations§
Source§impl Clone for Rfc3339Utc
impl Clone for Rfc3339Utc
Source§fn clone(&self) -> Rfc3339Utc
fn clone(&self) -> Rfc3339Utc
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 moreimpl Copy for Rfc3339Utc
Source§impl Debug for Rfc3339Utc
impl Debug for Rfc3339Utc
Source§impl<'de> Deserialize<'de> for Rfc3339Utc
impl<'de> Deserialize<'de> for Rfc3339Utc
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Rfc3339Utc
impl Display for Rfc3339Utc
impl Eq for Rfc3339Utc
Source§impl From<Rfc3339Utc> for DateTime<Utc>
impl From<Rfc3339Utc> for DateTime<Utc>
Source§fn from(v: Rfc3339Utc) -> Self
fn from(v: Rfc3339Utc) -> Self
Converts to this type from the input type.
Source§impl Hash for Rfc3339Utc
impl Hash for Rfc3339Utc
Source§impl Ord for Rfc3339Utc
impl Ord for Rfc3339Utc
Source§fn cmp(&self, other: &Rfc3339Utc) -> Ordering
fn cmp(&self, other: &Rfc3339Utc) -> 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 Rfc3339Utc
impl PartialEq for Rfc3339Utc
Source§impl PartialOrd for Rfc3339Utc
impl PartialOrd for Rfc3339Utc
Source§impl Serialize for Rfc3339Utc
impl Serialize for Rfc3339Utc
impl StructuralPartialEq for Rfc3339Utc
Source§impl TryFrom<&str> for Rfc3339Utc
impl TryFrom<&str> for Rfc3339Utc
Auto Trait Implementations§
impl Freeze for Rfc3339Utc
impl RefUnwindSafe for Rfc3339Utc
impl Send for Rfc3339Utc
impl Sync for Rfc3339Utc
impl Unpin for Rfc3339Utc
impl UnsafeUnpin for Rfc3339Utc
impl UnwindSafe for Rfc3339Utc
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.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> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP