#[non_exhaustive]pub enum TimestampStyle {
ShortTime,
MediumTime,
ShortDate,
LongDate,
LongDateShortTime,
FullDateShortTime,
ShortDateShortTime,
ShortDateMediumTime,
RelativeTime,
}Expand description
How Discord shows a time; the examples are for 20 April 2021, 16:20:30, in an English
client.
discord.js counterpart: TimestampStyles (whose deprecated aliases LongTime,
ShortDateTime and LongDateTime are MediumTime,
LongDateShortTime and
FullDateShortTime).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ShortTime
t: 16:20.
MediumTime
T: 16:20:30.
ShortDate
d: 20/04/2021.
LongDate
D: April 20, 2021.
LongDateShortTime
f: April 20, 2021 at 16:20 — what Discord shows without a style.
FullDateShortTime
F: Tuesday, April 20, 2021 at 16:20.
ShortDateShortTime
s: 20/04/2021, 16:20.
ShortDateMediumTime
S: 20/04/2021, 16:20:30.
RelativeTime
R: 4 years ago — kept up to date by the client.
Implementations§
Trait Implementations§
Source§impl Clone for TimestampStyle
impl Clone for TimestampStyle
impl Copy for TimestampStyle
Source§impl Debug for TimestampStyle
impl Debug for TimestampStyle
impl Eq for TimestampStyle
Source§impl Hash for TimestampStyle
impl Hash for TimestampStyle
Source§impl PartialEq for TimestampStyle
impl PartialEq for TimestampStyle
impl StructuralPartialEq for TimestampStyle
Auto Trait Implementations§
impl Freeze for TimestampStyle
impl RefUnwindSafe for TimestampStyle
impl Send for TimestampStyle
impl Sync for TimestampStyle
impl Unpin for TimestampStyle
impl UnsafeUnpin for TimestampStyle
impl UnwindSafe for TimestampStyle
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