pub struct Iso8601TimeSlug(/* private fields */);
Expand description
A UTC timestamp that can be encoded in ISO 8601 format,
and that can be used as a Slug
.
The encoded timestamp does not have a -
separator between date values,
or :
between time values, or any spaces.
The encoding format is [year][month][day][hour][minute][second]
.
§Example
let slug = "20241023130545".parse::<Iso8601TimeSlug>()?;
assert_eq!("20241023130545", slug.to_string());
Trait Implementations§
Source§impl Clone for Iso8601TimeSlug
impl Clone for Iso8601TimeSlug
Source§fn clone(&self) -> Iso8601TimeSlug
fn clone(&self) -> Iso8601TimeSlug
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 Iso8601TimeSlug
impl Debug for Iso8601TimeSlug
Source§impl Display for Iso8601TimeSlug
impl Display for Iso8601TimeSlug
Source§impl From<Iso8601TimeSlug> for SystemTime
impl From<Iso8601TimeSlug> for SystemTime
Source§fn from(value: Iso8601TimeSlug) -> Self
fn from(value: Iso8601TimeSlug) -> Self
Converts to this type from the input type.
Source§impl From<SystemTime> for Iso8601TimeSlug
impl From<SystemTime> for Iso8601TimeSlug
Source§fn from(value: SystemTime) -> Self
fn from(value: SystemTime) -> Self
Converts to this type from the input type.
Source§impl FromStr for Iso8601TimeSlug
impl FromStr for Iso8601TimeSlug
Source§impl Hash for Iso8601TimeSlug
impl Hash for Iso8601TimeSlug
Source§impl Ord for Iso8601TimeSlug
impl Ord for Iso8601TimeSlug
Source§fn cmp(&self, other: &Iso8601TimeSlug) -> Ordering
fn cmp(&self, other: &Iso8601TimeSlug) -> Ordering
1.21.0 · 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 Iso8601TimeSlug
impl PartialEq for Iso8601TimeSlug
Source§impl PartialOrd for Iso8601TimeSlug
impl PartialOrd for Iso8601TimeSlug
Source§impl TryInto<Slug> for Iso8601TimeSlug
impl TryInto<Slug> for Iso8601TimeSlug
impl Copy for Iso8601TimeSlug
impl Eq for Iso8601TimeSlug
impl StructuralPartialEq for Iso8601TimeSlug
Auto Trait Implementations§
impl Freeze for Iso8601TimeSlug
impl RefUnwindSafe for Iso8601TimeSlug
impl Send for Iso8601TimeSlug
impl Sync for Iso8601TimeSlug
impl Unpin for Iso8601TimeSlug
impl UnwindSafe for Iso8601TimeSlug
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more