pub struct ZonedDateTime<A, Z>where
A: AsCalendar,{
pub date: Date<A>,
pub time: Time,
pub zone: Z,
}Expand description
A date and time for a given calendar, local to a specified time zone.
The primary definition of this type is in the icu_time crate. Other ICU4X crates re-export it for convenience.
This type exists as an input type for datetime formatting and should only be constructed to pass to a datetime formatter.
§Semantics
This type represents the date, time, and time zone that are displayed to a user. It does not identify the absolute time that an event happens, nor does it represent the general concept of a “zoned date time”, which would require time zone and leap second information for operations like validation, arithmetic, and comparisons1.
Hence, while this type implements PartialEq/Eq (equal ZonedDateTimes will
display equally), it does not implement PartialOrd/Ord, arithmetic, and it
is possible to create ZonedDateTimes that do not exist.
ZonedDateTime<UtcOffset>is an exception to this, as the whole time zone identity is part of the type, and there are no local time discontinuities. Therefore it actually identifies an absolute time and implementsPartialOrd. ↩
Fields§
§date: Date<A>The date, local to the time zone
time: TimeThe time, local to the time zone
zone: ZThe time zone
Implementations§
Source§impl<A> ZonedDateTime<A, UtcOffset>where
A: AsCalendar,
impl<A> ZonedDateTime<A, UtcOffset>where
A: AsCalendar,
Sourcepub fn try_offset_only_from_str(
rfc_9557_str: &str,
calendar: A,
) -> Result<ZonedDateTime<A, UtcOffset>, ParseError>
pub fn try_offset_only_from_str( rfc_9557_str: &str, calendar: A, ) -> Result<ZonedDateTime<A, UtcOffset>, ParseError>
Create a ZonedDateTime in any calendar from an RFC 9557 string.
Returns an error if the string has a calendar annotation that does not match the calendar argument.
This function is “strict”: the string should have only an offset and no named time zone.
Sourcepub fn try_offset_only_from_utf8(
rfc_9557_str: &[u8],
calendar: A,
) -> Result<ZonedDateTime<A, UtcOffset>, ParseError>
pub fn try_offset_only_from_utf8( rfc_9557_str: &[u8], calendar: A, ) -> Result<ZonedDateTime<A, UtcOffset>, ParseError>
Create a ZonedDateTime in any calendar from RFC 9557 syntax UTF-8 bytes.
Source§impl<A> ZonedDateTime<A, TimeZoneInfo<AtTime>>where
A: AsCalendar,
impl<A> ZonedDateTime<A, TimeZoneInfo<AtTime>>where
A: AsCalendar,
Sourcepub fn try_location_only_from_str(
rfc_9557_str: &str,
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
pub fn try_location_only_from_str( rfc_9557_str: &str, calendar: A, iana_parser: IanaParserBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
Create a ZonedDateTime in any calendar from an RFC 9557 string.
Returns an error if the string has a calendar annotation that does not match the calendar argument.
This function is “strict”: the string should have only a named time zone and no offset.
Sourcepub fn try_location_only_from_utf8(
rfc_9557_str: &[u8],
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
pub fn try_location_only_from_utf8( rfc_9557_str: &[u8], calendar: A, iana_parser: IanaParserBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
Create a ZonedDateTime in any calendar from RFC 9557 UTF-8 bytes.
Sourcepub fn try_lenient_from_str(
rfc_9557_str: &str,
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
pub fn try_lenient_from_str( rfc_9557_str: &str, calendar: A, iana_parser: IanaParserBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
Create a ZonedDateTime in any calendar from an RFC 9557 string.
Returns an error if the string has a calendar annotation that does not match the calendar argument.
This function is “lenient”: the string can have an offset, and named time zone, both, or neither. If the named time zone is missing, it is returned as Etc/Unknown.
Sourcepub fn try_lenient_from_utf8(
rfc_9557_str: &[u8],
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
pub fn try_lenient_from_utf8( rfc_9557_str: &[u8], calendar: A, iana_parser: IanaParserBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
Create a ZonedDateTime in any calendar from RFC 9557 UTF-8 bytes.
Sourcepub fn try_strict_from_str(
rfc_9557_str: &str,
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
pub fn try_strict_from_str( rfc_9557_str: &str, calendar: A, iana_parser: IanaParserBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
Create a ZonedDateTime in any calendar from an RFC 9557 string.
Returns an error if the string has a calendar annotation that does not match the calendar argument.
The string should have both an offset and a named time zone.
For more information on RFC 9557, see the ixdtf crate.
§Examples
Basic usage:
use icu::calendar::cal::Hebrew;
use icu::locale::subtags::subtag;
use icu::time::{
zone::{IanaParser, TimeZoneVariant, UtcOffset},
TimeZone, TimeZoneInfo, ZonedDateTime,
};
let zoneddatetime = ZonedDateTime::try_strict_from_str(
"2024-08-08T12:08:19-05:00[America/Chicago][u-ca=hebrew]",
Hebrew,
IanaParser::new(),
)
.unwrap();
assert_eq!(zoneddatetime.date.year().extended_year(), 5784);
assert_eq!(
zoneddatetime.date.month().to_input().code(),
icu::calendar::types::MonthCode(tinystr::tinystr!(4, "M11"))
);
assert_eq!(zoneddatetime.date.day_of_month().0, 4);
assert_eq!(zoneddatetime.time.hour.number(), 12);
assert_eq!(zoneddatetime.time.minute.number(), 8);
assert_eq!(zoneddatetime.time.second.number(), 19);
assert_eq!(zoneddatetime.time.subsecond.number(), 0);
assert_eq!(
zoneddatetime.zone.id(),
TimeZone::from_iana_id("America/Chicago")
);
assert_eq!(
zoneddatetime.zone.offset(),
Some(UtcOffset::try_from_seconds(-5 * 3600).unwrap())
);
let _ = zoneddatetime.zone.zone_name_timestamp();An RFC 9557 string can provide a time zone in two parts: the DateTime UTC Offset or the Time Zone
Annotation. A DateTime UTC Offset is the time offset as laid out by RFC 3339; meanwhile, the Time
Zone Annotation is the annotation laid out by RFC 9557 and is defined as a UTC offset or IANA Time
Zone identifier.
§DateTime UTC Offsets
Below is an example of a time zone from a DateTime UTC Offset. The syntax here is familiar to a RFC 3339
DateTime string.
use icu::calendar::Iso;
use icu::time::{zone::UtcOffset, TimeZoneInfo, ZonedDateTime};
let tz_from_offset = ZonedDateTime::try_offset_only_from_str(
"2024-08-08T12:08:19-05:00",
Iso,
)
.unwrap();
assert_eq!(
tz_from_offset.zone,
UtcOffset::try_from_seconds(-5 * 3600).unwrap()
);§Time Zone Annotations
Below is an example of a time zone being provided by a time zone annotation.
use icu::calendar::Iso;
use icu::locale::subtags::subtag;
use icu::time::{
zone::{IanaParser, TimeZoneVariant, UtcOffset},
TimeZone, TimeZoneInfo, ZonedDateTime,
};
let tz_from_offset_annotation = ZonedDateTime::try_offset_only_from_str(
"2024-08-08T12:08:19[-05:00]",
Iso,
)
.unwrap();
let tz_from_iana_annotation = ZonedDateTime::try_location_only_from_str(
"2024-08-08T12:08:19[America/Chicago]",
Iso,
IanaParser::new(),
)
.unwrap();
assert_eq!(
tz_from_offset_annotation.zone,
UtcOffset::try_from_seconds(-5 * 3600).unwrap()
);
assert_eq!(
tz_from_iana_annotation.zone.id(),
TimeZone(subtag!("uschi"))
);
assert_eq!(tz_from_iana_annotation.zone.offset(), None);§UTC Offset and time zone annotations.
An RFC 9557 string may contain both a UTC Offset and time zone annotation. This is fine as long as the time zone parts can be deemed as inconsistent or unknown consistency.
§DateTime UTC offset with UTC Offset annotation.
These annotations must always be consistent as they should be either the same value or are inconsistent.
use icu::calendar::Iso;
use icu::time::{
zone::UtcOffset, ParseError, TimeZone, TimeZoneInfo, ZonedDateTime,
};
use tinystr::tinystr;
let consistent_tz_from_both = ZonedDateTime::try_offset_only_from_str(
"2024-08-08T12:08:19-05:00[-05:00]",
Iso,
)
.unwrap();
assert_eq!(
consistent_tz_from_both.zone,
UtcOffset::try_from_seconds(-5 * 3600).unwrap()
);
let inconsistent_tz_from_both = ZonedDateTime::try_offset_only_from_str(
"2024-08-08T12:08:19-05:00[+05:00]",
Iso,
);
assert!(matches!(
inconsistent_tz_from_both,
Err(ParseError::InconsistentTimeUtcOffsets)
));Sourcepub fn try_strict_from_utf8(
rfc_9557_str: &[u8],
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
pub fn try_strict_from_utf8( rfc_9557_str: &[u8], calendar: A, iana_parser: IanaParserBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<AtTime>>, ParseError>
Create a ZonedDateTime in any calendar from RFC 9557 UTF-8 bytes.
Source§impl<A> ZonedDateTime<A, TimeZoneInfo<Full>>where
A: AsCalendar,
impl<A> ZonedDateTime<A, TimeZoneInfo<Full>>where
A: AsCalendar,
Sourcepub fn try_full_from_str(
rfc_9557_str: &str,
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
offset_calculator: VariantOffsetsCalculatorBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<Full>>, ParseError>
👎Deprecated since 2.1.0: use try_strict_from_str
pub fn try_full_from_str( rfc_9557_str: &str, calendar: A, iana_parser: IanaParserBorrowed<'_>, offset_calculator: VariantOffsetsCalculatorBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<Full>>, ParseError>
use try_strict_from_str
Create a ZonedDateTime in any calendar from an RFC 9557 string.
Sourcepub fn try_full_from_utf8(
rfc_9557_str: &[u8],
calendar: A,
iana_parser: IanaParserBorrowed<'_>,
offset_calculator: VariantOffsetsCalculatorBorrowed<'_>,
) -> Result<ZonedDateTime<A, TimeZoneInfo<Full>>, ParseError>
👎Deprecated since 2.1.0: use try_strict_from_utf8
pub fn try_full_from_utf8( rfc_9557_str: &[u8], calendar: A, iana_parser: IanaParserBorrowed<'_>, offset_calculator: VariantOffsetsCalculatorBorrowed<'_>, ) -> Result<ZonedDateTime<A, TimeZoneInfo<Full>>, ParseError>
use try_strict_from_utf8
Create a ZonedDateTime in any calendar from RFC 9557 UTF-8 bytes.
Source§impl ZonedDateTime<Iso, UtcOffset>
impl ZonedDateTime<Iso, UtcOffset>
Sourcepub fn from_epoch_milliseconds_and_utc_offset(
epoch_milliseconds: i64,
utc_offset: UtcOffset,
) -> ZonedDateTime<Iso, UtcOffset>
pub fn from_epoch_milliseconds_and_utc_offset( epoch_milliseconds: i64, utc_offset: UtcOffset, ) -> ZonedDateTime<Iso, UtcOffset>
Creates a ZonedDateTime from an absolute time, in milliseconds since the UNIX Epoch,
and a UTC offset.
This constructor returns a ZonedDateTime that supports only the localized offset
time zone style.
§Examples
use icu::calendar::cal::Iso;
use icu::time::zone::UtcOffset;
use icu::time::ZonedDateTime;
let iso_str = "2025-04-30T17:45-0700";
let timestamp = 1746060300000; // milliseconds since UNIX epoch
let offset: UtcOffset = "-0700".parse().unwrap();
let zdt_from_timestamp =
ZonedDateTime::from_epoch_milliseconds_and_utc_offset(
timestamp, offset,
);
// Check that it equals the same as the parse result:
let zdt_from_str =
ZonedDateTime::try_offset_only_from_str(iso_str, Iso).unwrap();
assert_eq!(zdt_from_timestamp, zdt_from_str);Negative timestamps are supported:
use icu::calendar::cal::Iso;
use icu::time::zone::UtcOffset;
use icu::time::ZonedDateTime;
let iso_str = "1920-01-02T03:04:05.250+0600";
let timestamp = -1577847354750; // milliseconds since UNIX epoch
let offset: UtcOffset = "+0600".parse().unwrap();
let zdt_from_timestamp =
ZonedDateTime::from_epoch_milliseconds_and_utc_offset(
timestamp, offset,
);
// Check that it equals the same as the parse result:
let zdt_from_str =
ZonedDateTime::try_offset_only_from_str(iso_str, Iso).unwrap();
assert_eq!(zdt_from_timestamp, zdt_from_str);When epoch milliseconds exceed the representable date range, the date component saturates to the maximum or minimum representable date in the ISO calendar
use icu::calendar::cal::Iso;
use icu::time::zone::UtcOffset;
use icu::time::ZonedDateTime;
let max_offset = UtcOffset::try_from_seconds(14 * 3600).unwrap();
let zdt_max = ZonedDateTime::from_epoch_milliseconds_and_utc_offset(
i64::MAX,
max_offset,
);
let min_offset = UtcOffset::try_from_seconds(-12 * 3600).unwrap();
let zdt_min = ZonedDateTime::from_epoch_milliseconds_and_utc_offset(
i64::MIN,
min_offset,
);Trait Implementations§
Source§impl<A, Z> Clone for ZonedDateTime<A, Z>
impl<A, Z> Clone for ZonedDateTime<A, Z>
Source§fn clone(&self) -> ZonedDateTime<A, Z>
fn clone(&self) -> ZonedDateTime<A, Z>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<C: IntoAnyCalendar, A: AsCalendar<Calendar = C>, Z: Copy> ConvertCalendar for ZonedDateTime<A, Z>
impl<C: IntoAnyCalendar, A: AsCalendar<Calendar = C>, Z: Copy> ConvertCalendar for ZonedDateTime<A, Z>
Source§type Converted<'a> = ZonedDateTime<Ref<'a, AnyCalendar>, Z>
type Converted<'a> = ZonedDateTime<Ref<'a, AnyCalendar>, Z>
Source§fn to_calendar<'a>(&self, calendar: &'a AnyCalendar) -> Self::Converted<'a>
fn to_calendar<'a>(&self, calendar: &'a AnyCalendar) -> Self::Converted<'a>
self to the specified AnyCalendar.Source§impl<A, Z> Debug for ZonedDateTime<A, Z>
impl<A, Z> Debug for ZonedDateTime<A, Z>
Source§impl<Tz> From<&DateTime<Tz>> for ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
impl<Tz> From<&DateTime<Tz>> for ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
Source§fn from(chrono: &DateTime<Tz>) -> ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
fn from(chrono: &DateTime<Tz>) -> ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
Source§impl<Tz> From<&DateTime<Tz>> for ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
impl<Tz> From<&DateTime<Tz>> for ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
Source§fn from(chrono: &DateTime<Tz>) -> ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
fn from(chrono: &DateTime<Tz>) -> ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
Source§impl From<&OffsetDateTime> for ZonedDateTime<Gregorian, UtcOffset>
impl From<&OffsetDateTime> for ZonedDateTime<Gregorian, UtcOffset>
Source§fn from(other: &OffsetDateTime) -> ZonedDateTime<Gregorian, UtcOffset>
fn from(other: &OffsetDateTime) -> ZonedDateTime<Gregorian, UtcOffset>
Source§impl From<&Zoned> for ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
Available on crate feature compiled_data only.
impl From<&Zoned> for ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
compiled_data only.Source§fn from(jiff: &Zoned) -> ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
fn from(jiff: &Zoned) -> ZonedDateTime<Gregorian, TimeZoneInfo<AtTime>>
Source§impl From<&Zoned> for ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
Available on crate feature compiled_data only.
impl From<&Zoned> for ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
compiled_data only.Source§fn from(jiff: &Zoned) -> ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
fn from(jiff: &Zoned) -> ZonedDateTime<Gregorian, TimeZoneInfo<Base>>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<()> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<()> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<DayOfMonth> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<DayOfMonth> for ZonedDateTime<A, Z>
Source§fn get_field(&self) -> DayOfMonth
fn get_field(&self) -> DayOfMonth
T.Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<DayOfYear> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<DayOfYear> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Hour> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Hour> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Minute> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Minute> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<MonthInfo> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<MonthInfo> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Nanosecond> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Nanosecond> for ZonedDateTime<A, Z>
Source§fn get_field(&self) -> Nanosecond
fn get_field(&self) -> Nanosecond
T.Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Option<UtcOffset>> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Option<UtcOffset>> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<RataDie> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<RataDie> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Second> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Second> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<TimeZone> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<TimeZone> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Weekday> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<Weekday> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<YearInfo> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<YearInfo> for ZonedDateTime<A, Z>
Source§impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<ZoneNameTimestamp> for ZonedDateTime<A, Z>where
Z: GetField<ZoneNameTimestamp>,
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> GetField<ZoneNameTimestamp> for ZonedDateTime<A, Z>where
Z: GetField<ZoneNameTimestamp>,
Source§fn get_field(&self) -> ZoneNameTimestamp
fn get_field(&self) -> ZoneNameTimestamp
T.Source§impl<C: IntoAnyCalendar, A: AsCalendar<Calendar = C>, Z> InSameCalendar for ZonedDateTime<A, Z>
impl<C: IntoAnyCalendar, A: AsCalendar<Calendar = C>, Z> InSameCalendar for ZonedDateTime<A, Z>
Source§fn check_any_calendar_kind(
&self,
any_calendar_kind: AnyCalendarKind,
) -> Result<(), MismatchedCalendarError>
fn check_any_calendar_kind( &self, any_calendar_kind: AnyCalendarKind, ) -> Result<(), MismatchedCalendarError>
Source§impl<A> Ord for ZonedDateTime<A, UtcOffset>where
A: AsCalendar,
impl<A> Ord for ZonedDateTime<A, UtcOffset>where
A: AsCalendar,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<A, B, Y, Z> PartialEq<ZonedDateTime<B, Z>> for ZonedDateTime<A, Y>
impl<A, B, Y, Z> PartialEq<ZonedDateTime<B, Z>> for ZonedDateTime<A, Y>
Source§impl<A> PartialOrd for ZonedDateTime<A, UtcOffset>
impl<A> PartialOrd for ZonedDateTime<A, UtcOffset>
impl<A, Z> Copy for ZonedDateTime<A, Z>
impl<A, Z> Eq for ZonedDateTime<A, Z>
impl<C: CldrCalendar, A: AsCalendar<Calendar = C>, Z> InFixedCalendar<C> for ZonedDateTime<A, Z>
impl<C: Calendar, A: AsCalendar<Calendar = C>, Z> UnstableSealed for ZonedDateTime<A, Z>
Auto Trait Implementations§
impl<A, Z> Freeze for ZonedDateTime<A, Z>
impl<A, Z> RefUnwindSafe for ZonedDateTime<A, Z>where
Z: RefUnwindSafe,
<<A as AsCalendar>::Calendar as Calendar>::DateInner: RefUnwindSafe,
A: RefUnwindSafe,
impl<A, Z> Send for ZonedDateTime<A, Z>
impl<A, Z> Sync for ZonedDateTime<A, Z>
impl<A, Z> Unpin for ZonedDateTime<A, Z>
impl<A, Z> UnsafeUnpin for ZonedDateTime<A, Z>where
Z: UnsafeUnpin,
<<A as AsCalendar>::Calendar as Calendar>::DateInner: UnsafeUnpin,
A: UnsafeUnpin,
impl<A, Z> UnwindSafe for ZonedDateTime<A, Z>where
Z: UnwindSafe,
<<A as AsCalendar>::Calendar as Calendar>::DateInner: UnwindSafe,
A: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetField<T> for Twhere
T: Copy + UnstableSealed,
impl<T> GetField<T> for Twhere
T: Copy + UnstableSealed,
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>
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>
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