pub enum TimestampStyle {
LongDateTime,
LongDate,
LongTime,
RelativeTime,
ShortDateTime,
ShortDate,
ShortTime,
}
Expand description
Style modifier denoting how to display a timestamp.
The default variant is ShortDateTime
.
Variants§
LongDateTime
Style modifier to display a timestamp as a long date/time.
Correlates to the style F
.
Causes mentions to display in clients as Tuesday, 1 April 2021 01:20
.
LongDate
Style modifier to display a timestamp as a long date.
Correlates to the style D
.
Causes mentions to display in clients as 1 April 2021
.
LongTime
Style modifier to display a timestamp as a long date/time.
Correlates to the style T
.
Causes mentions to display in clients as 01:20:30
.
RelativeTime
Style modifier to display a timestamp as a relative timestamp.
Correlates to the style R
.
Causes mentions to display in clients as 2 months ago
.
ShortDateTime
Style modifier to display a timestamp as a short date/time.
Correlates to the style f
.
Causes mentions to display in clients as 1 April 2021 01:20
.
This is the default style when left unspecified.
ShortDate
Style modifier to display a timestamp as a short date/time.
Correlates to the style d
.
Causes mentions to display in clients as 1/4/2021
.
ShortTime
Style modifier to display a timestamp as a short date/time.
Correlates to the style t
.
Causes mentions to display in clients as 01:20
.
Implementations§
Trait Implementations§
source§impl Clone for TimestampStyle
impl Clone for TimestampStyle
source§fn clone(&self) -> TimestampStyle
fn clone(&self) -> TimestampStyle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TimestampStyle
impl Debug for TimestampStyle
source§impl Display for TimestampStyle
impl Display for TimestampStyle
source§impl Hash for TimestampStyle
impl Hash for TimestampStyle
source§impl PartialEq<TimestampStyle> for TimestampStyle
impl PartialEq<TimestampStyle> for TimestampStyle
source§fn eq(&self, other: &TimestampStyle) -> bool
fn eq(&self, other: &TimestampStyle) -> bool
self
and other
values to be equal, and is used
by ==
.