#[non_exhaustive]pub struct UTCDate(/* private fields */);Expand description
RFC 3339 UTC timestamp string (RFC 8620 §1.4).
Format: YYYY-MM-DDTHH:MM:SSZ — time-offset MUST be Z, letters uppercase,
fractional seconds omitted if zero. Example: "2014-10-30T06:12:00Z".
Implementations§
Source§impl UTCDate
impl UTCDate
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consumes the value and returns the inner String.
Source§impl UTCDate
impl UTCDate
Sourcepub fn new_validated(s: impl Into<String>) -> Result<Self, ValidationError>
pub fn new_validated(s: impl Into<String>) -> Result<Self, ValidationError>
Construct a UTCDate with RFC 8620 §1.4 format validation.
Requires exactly the format YYYY-MM-DDTHH:MM:SSZ (20 characters,
Z suffix, all numeric fields are ASCII digits).
Use UTCDate::from when the value is known to be valid.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UTCDate
impl<'de> Deserialize<'de> for UTCDate
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 UTCDate
impl StructuralPartialEq for UTCDate
Auto Trait Implementations§
impl Freeze for UTCDate
impl RefUnwindSafe for UTCDate
impl Send for UTCDate
impl Sync for UTCDate
impl Unpin for UTCDate
impl UnsafeUnpin for UTCDate
impl UnwindSafe for UTCDate
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