Struct icu::timezone::CustomZonedDateTime
source · pub struct CustomZonedDateTime<A, Z>where
A: AsCalendar,{
pub date: Date<A>,
pub time: Time,
pub zone: Z,
}
Expand description
A date and time local to a specified custom time zone.
Fields§
§date: Date<A>
The date, local to the time zone
time: Time
The time, local to the time zone
zone: Z
The time zone
Implementations§
source§impl<A, Z> CustomZonedDateTime<A, Z>where
A: AsCalendar,
Z: Copy,
impl<A, Z> CustomZonedDateTime<A, Z>where
A: AsCalendar,
Z: Copy,
sourcepub fn to_iso(&self) -> CustomZonedDateTime<Iso, Z>
pub fn to_iso(&self) -> CustomZonedDateTime<Iso, Z>
Convert the CustomZonedDateTime to an ISO CustomZonedDateTime
sourcepub fn to_calendar<A2>(&self, calendar: A2) -> CustomZonedDateTime<A2, Z>where
A2: AsCalendar,
pub fn to_calendar<A2>(&self, calendar: A2) -> CustomZonedDateTime<A2, Z>where
A2: AsCalendar,
Convert the CustomZonedDateTime to a CustomZonedDateTime in a different calendar
Trait Implementations§
source§impl<C, A, Z> ConvertCalendar for CustomZonedDateTime<A, Z>
impl<C, A, Z> ConvertCalendar for CustomZonedDateTime<A, Z>
source§type Converted<'a> = CustomZonedDateTime<Ref<'a, AnyCalendar>, Z>
type Converted<'a> = CustomZonedDateTime<Ref<'a, AnyCalendar>, Z>
The converted type. This can be the same as the receiver type.
source§fn to_calendar<'a>(
&self,
calendar: &'a AnyCalendar,
) -> <CustomZonedDateTime<A, Z> as ConvertCalendar>::Converted<'a>
fn to_calendar<'a>( &self, calendar: &'a AnyCalendar, ) -> <CustomZonedDateTime<A, Z> as ConvertCalendar>::Converted<'a>
Converts
self
to the specified AnyCalendar
.source§impl<A, Z> Debug for CustomZonedDateTime<A, Z>
impl<A, Z> Debug for CustomZonedDateTime<A, Z>
source§impl<C, A, Z> GetField<()> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<()> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl<C, A, Z> GetField<DayOfMonth> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<DayOfMonth> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn get_field(&self) -> DayOfMonth
fn get_field(&self) -> DayOfMonth
Returns the value of this trait’s field
T
.source§impl<C, A, Z> GetField<DayOfYearInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<DayOfYearInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn get_field(&self) -> DayOfYearInfo
fn get_field(&self) -> DayOfYearInfo
Returns the value of this trait’s field
T
.source§impl<C, A, Z> GetField<IsoHour> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<IsoHour> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl<C, A, Z> GetField<IsoMinute> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<IsoMinute> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl<C, A, Z> GetField<IsoSecond> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<IsoSecond> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl<C, A, Z> GetField<IsoWeekday> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<IsoWeekday> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn get_field(&self) -> IsoWeekday
fn get_field(&self) -> IsoWeekday
Returns the value of this trait’s field
T
.source§impl<C, A, Z> GetField<MonthInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<MonthInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl<C, A, Z> GetField<NanoSecond> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<NanoSecond> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn get_field(&self) -> NanoSecond
fn get_field(&self) -> NanoSecond
Returns the value of this trait’s field
T
.source§impl<C, A, Z> GetField<TimeZoneBcp47Id> for CustomZonedDateTime<A, Z>
impl<C, A, Z> GetField<TimeZoneBcp47Id> for CustomZonedDateTime<A, Z>
source§fn get_field(&self) -> TimeZoneBcp47Id
fn get_field(&self) -> TimeZoneBcp47Id
Returns the value of this trait’s field
T
.source§impl<C, A, Z> GetField<YearInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<YearInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl<C, A, Z> GetField<ZoneVariant> for CustomZonedDateTime<A, Z>
impl<C, A, Z> GetField<ZoneVariant> for CustomZonedDateTime<A, Z>
source§fn get_field(&self) -> ZoneVariant
fn get_field(&self) -> ZoneVariant
Returns the value of this trait’s field
T
.source§impl<C, A, Z> InSameCalendar for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> InSameCalendar for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn check_any_calendar_kind(
&self,
_: AnyCalendarKind,
) -> Result<(), MismatchedCalendarError>
fn check_any_calendar_kind( &self, _: AnyCalendarKind, ) -> Result<(), MismatchedCalendarError>
Checks whether this type is compatible with the given calendar. Read more
impl<C, A, Z> InFixedCalendar<C> for CustomZonedDateTime<A, Z>where
C: CldrCalendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> UnstableSealed for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
Auto Trait Implementations§
impl<A, Z> Freeze for CustomZonedDateTime<A, Z>
impl<A, Z> RefUnwindSafe for CustomZonedDateTime<A, Z>where
Z: RefUnwindSafe,
<<A as AsCalendar>::Calendar as Calendar>::DateInner: RefUnwindSafe,
A: RefUnwindSafe,
impl<A, Z> Send for CustomZonedDateTime<A, Z>
impl<A, Z> Sync for CustomZonedDateTime<A, Z>
impl<A, Z> Unpin for CustomZonedDateTime<A, Z>
impl<A, Z> UnwindSafe for CustomZonedDateTime<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
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