#[non_exhaustive]pub struct DateTimeOptions<'a> {
pub date: Option<DateStyle>,
pub time: Option<TimePrecision>,
pub time_zone_style: Option<ZoneStyle>,
pub time_zone: Option<ZoneOption<'a>>,
pub hour12: Option<bool>,
pub calendar: Option<&'a str>,
}Expand description
What :datetime, :date or :time resolved (datetime.md). The
override options (time_zone, hour12, calendar) travel with the
value into a later date/time expression that takes it as its operand.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.date: Option<DateStyle>The date part; None: none (:time), or not resolved.
time: Option<TimePrecision>The time part; None: none (:date), or not resolved.
time_zone_style: Option<ZoneStyle>timeZoneStyle; None: no time-zone indicator.
time_zone: Option<ZoneOption<'a>>timeZone.
hour12: Option<bool>hour12.
calendar: Option<&'a str>calendar: a Unicode calendar identifier.
Implementations§
Source§impl DateTimeOptions<'_>
impl DateTimeOptions<'_>
Sourcepub const NONE: DateTimeOptions<'static>
pub const NONE: DateTimeOptions<'static>
No options.
Sourcepub const fn is_resolved(&self) -> bool
pub const fn is_resolved(&self) -> bool
Whether a date/time function resolved the value (it has a date or a time part).
Trait Implementations§
Source§impl<'a> Clone for DateTimeOptions<'a>
impl<'a> Clone for DateTimeOptions<'a>
impl<'a> Copy for DateTimeOptions<'a>
Source§impl<'a> Debug for DateTimeOptions<'a>
impl<'a> Debug for DateTimeOptions<'a>
Source§impl<'a> Default for DateTimeOptions<'a>
impl<'a> Default for DateTimeOptions<'a>
impl<'a> Eq for DateTimeOptions<'a>
Source§impl<'a> Hash for DateTimeOptions<'a>
impl<'a> Hash for DateTimeOptions<'a>
Source§impl<'a> PartialEq for DateTimeOptions<'a>
impl<'a> PartialEq for DateTimeOptions<'a>
impl<'a> StructuralPartialEq for DateTimeOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for DateTimeOptions<'a>
impl<'a> RefUnwindSafe for DateTimeOptions<'a>
impl<'a> Send for DateTimeOptions<'a>
impl<'a> Sync for DateTimeOptions<'a>
impl<'a> Unpin for DateTimeOptions<'a>
impl<'a> UnsafeUnpin for DateTimeOptions<'a>
impl<'a> UnwindSafe for DateTimeOptions<'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