#[repr(C)]pub struct ZonedDateTime {
pub date: Box<Date>,
pub time: Box<Time>,
pub zone: Box<TimeZoneInfo>,
}
Expand description
An ICU4X DateTime object capable of containing a date, time, and zone for any calendar.
Fields§
§date: Box<Date>
§time: Box<Time>
§zone: Box<TimeZoneInfo>
Implementations§
Source§impl ZonedDateTime
impl ZonedDateTime
Sourcepub fn from_string(
v: &DiplomatStr,
calendar: &Calendar,
iana_parser: &IanaParser,
offset_calculator: &VariantOffsetsCalculator,
) -> Result<ZonedDateTime, CalendarParseError>
pub fn from_string( v: &DiplomatStr, calendar: &Calendar, iana_parser: &IanaParser, offset_calculator: &VariantOffsetsCalculator, ) -> Result<ZonedDateTime, CalendarParseError>
Creates a new ZonedDateTime
from an IXDTF string.
Sourcepub fn location_only_from_string(
v: &DiplomatStr,
calendar: &Calendar,
iana_parser: &IanaParser,
) -> Result<ZonedDateTime, CalendarParseError>
pub fn location_only_from_string( v: &DiplomatStr, calendar: &Calendar, iana_parser: &IanaParser, ) -> Result<ZonedDateTime, CalendarParseError>
Creates a new ZonedDateTime
from a location-only IXDTF string.
Sourcepub fn offset_only_from_string(
v: &DiplomatStr,
calendar: &Calendar,
) -> Result<ZonedDateTime, CalendarParseError>
pub fn offset_only_from_string( v: &DiplomatStr, calendar: &Calendar, ) -> Result<ZonedDateTime, CalendarParseError>
Creates a new ZonedDateTime
from an offset-only IXDTF string.
Sourcepub fn loose_from_string(
v: &DiplomatStr,
calendar: &Calendar,
iana_parser: &IanaParser,
) -> Result<ZonedDateTime, CalendarParseError>
pub fn loose_from_string( v: &DiplomatStr, calendar: &Calendar, iana_parser: &IanaParser, ) -> Result<ZonedDateTime, CalendarParseError>
Creates a new ZonedDateTime
from an IXDTF string, without requiring the offset or calculating the zone variant.
Auto Trait Implementations§
impl Freeze for ZonedDateTime
impl RefUnwindSafe for ZonedDateTime
impl Send for ZonedDateTime
impl Sync for ZonedDateTime
impl Unpin for ZonedDateTime
impl UnwindSafe for ZonedDateTime
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> 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