pub struct VcardTimestamp<'a>(pub Cow<'a, str>);Expand description
A decoded timestamp value, kept as its raw text.
Tuple Fields§
§0: Cow<'a, str>Implementations§
Source§impl VcardTimestamp<'_>
impl VcardTimestamp<'_>
Sourcepub fn to_unix_seconds(&self) -> Option<i64>
pub fn to_unix_seconds(&self) -> Option<i64>
Normalizes the RFC 6350 timestamp to seconds from the Unix epoch, so two
revisions can be ordered; None when the text will not parse.
Accepts the ISO 8601 basic (20260711T172559Z) and extended
(2026-07-11T17:25:59Z) forms, a Z or numeric offset, and reduced
precision (omitted trailing components read as zero); no zone means UTC.
For ordering only: it disagrees with the derived PartialEq, which
compares raw text, so it is not exposed as Ord.
Trait Implementations§
Source§impl<'a> Clone for VcardTimestamp<'a>
impl<'a> Clone for VcardTimestamp<'a>
Source§fn clone(&self) -> VcardTimestamp<'a>
fn clone(&self) -> VcardTimestamp<'a>
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<'a> Debug for VcardTimestamp<'a>
impl<'a> Debug for VcardTimestamp<'a>
Source§impl<'a> Default for VcardTimestamp<'a>
impl<'a> Default for VcardTimestamp<'a>
Source§fn default() -> VcardTimestamp<'a>
fn default() -> VcardTimestamp<'a>
Returns the “default value” for a type. Read more
impl<'a> Eq for VcardTimestamp<'a>
Source§impl<'a> From<&'a str> for VcardTimestamp<'a>
impl<'a> From<&'a str> for VcardTimestamp<'a>
Source§impl From<String> for VcardTimestamp<'_>
impl From<String> for VcardTimestamp<'_>
Source§impl<'a> PartialEq for VcardTimestamp<'a>
impl<'a> PartialEq for VcardTimestamp<'a>
impl<'a> StructuralPartialEq for VcardTimestamp<'a>
Source§impl<'v> VcardCodec<'v> for VcardTimestamp<'v>
Available on crate feature parser only.
impl<'v> VcardCodec<'v> for VcardTimestamp<'v>
Available on crate feature
parser only.Source§fn decode(node: &'v VcardValueNode<'_>) -> Self
fn decode(node: &'v VcardValueNode<'_>) -> Self
Decode the value from a syntax node.
Source§fn encode(&self, escaper: VcardEscaper) -> VcardValueNode<'static>
fn encode(&self, escaper: VcardEscaper) -> VcardValueNode<'static>
Encode the value into a syntax node for the given escaping mode.
Auto Trait Implementations§
impl<'a> Freeze for VcardTimestamp<'a>
impl<'a> RefUnwindSafe for VcardTimestamp<'a>
impl<'a> Send for VcardTimestamp<'a>
impl<'a> Sync for VcardTimestamp<'a>
impl<'a> Unpin for VcardTimestamp<'a>
impl<'a> UnsafeUnpin for VcardTimestamp<'a>
impl<'a> UnwindSafe for VcardTimestamp<'a>
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