Enum ark_api::time::TimeFormat
source · [−]#[repr(u32)]
pub enum TimeFormat {
RelativeFriendly,
Year,
YearMonth,
Date,
HourMinute,
HourMinuteSecond,
ISODate,
ISODateTime,
ISODateTimeUTC,
}
Expand description
All of these time formats are local, except ISODateTimeUTC.
Variants
RelativeFriendly
“Yesterday”, “A few seconds ago”, etc.
Year
1999
YearMonth
July 1999 (or local variants)
Date
July 5, 1999 (or local variants)
HourMinute
14:43 (or 2:43 PM, locale dependent)
HourMinuteSecond
14:43:45 (or 2:43 PM, locale dependent)
ISODate
Local timezone ISO 8601 date: 1996-12-19
ISODateTime
Local timezone ISO 8601 date and time string: 1996-12-19T16:39:57-08:00
ISODateTimeUTC
UTC timezone ISO 8601 date and time string: 1996-12-19T16:39:57Z
Trait Implementations
sourceimpl CheckedBitPattern for TimeFormat
impl CheckedBitPattern for TimeFormat
type Bits = u32
type Bits = u32
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
. Read more
sourcefn is_valid_bit_pattern(bits: &<TimeFormat as CheckedBitPattern>::Bits) -> bool
fn is_valid_bit_pattern(bits: &<TimeFormat as CheckedBitPattern>::Bits) -> bool
If this function returns true, then it must be valid to reinterpret bits
as &Self
. Read more
sourceimpl Clone for TimeFormat
impl Clone for TimeFormat
sourcefn clone(&self) -> TimeFormat
fn clone(&self) -> TimeFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TimeFormat
impl Debug for TimeFormat
sourceimpl Hash for TimeFormat
impl Hash for TimeFormat
sourceimpl PartialEq<TimeFormat> for TimeFormat
impl PartialEq<TimeFormat> for TimeFormat
sourcefn eq(&self, other: &TimeFormat) -> bool
fn eq(&self, other: &TimeFormat) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl TryFrom<u32> for TimeFormat
impl TryFrom<u32> for TimeFormat
type Error = TryFromPrimitiveError<TimeFormat>
type Error = TryFromPrimitiveError<TimeFormat>
The type returned in the event of a conversion error.
sourcefn try_from(
number: u32
) -> Result<TimeFormat, TryFromPrimitiveError<TimeFormat>>
fn try_from(
number: u32
) -> Result<TimeFormat, TryFromPrimitiveError<TimeFormat>>
Performs the conversion.
sourceimpl TryFromPrimitive for TimeFormat
impl TryFromPrimitive for TimeFormat
type Primitive = u32
const NAME: &'static str = "TimeFormat"
fn try_from_primitive(
number: <TimeFormat as TryFromPrimitive>::Primitive
) -> Result<TimeFormat, TryFromPrimitiveError<TimeFormat>>
impl Copy for TimeFormat
impl Eq for TimeFormat
impl NoUninit for TimeFormat
impl StructuralEq for TimeFormat
impl StructuralPartialEq for TimeFormat
Auto Trait Implementations
impl RefUnwindSafe for TimeFormat
impl Send for TimeFormat
impl Sync for TimeFormat
impl Unpin for TimeFormat
impl UnwindSafe for TimeFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more