Struct icu_timezone::CustomZonedDateTime
source · pub struct CustomZonedDateTime<A: AsCalendar, Z> {
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: AsCalendar, Z: Copy> CustomZonedDateTime<A, Z>
impl<A: AsCalendar, Z: Copy> CustomZonedDateTime<A, Z>
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: AsCalendar>(
&self,
calendar: A2,
) -> CustomZonedDateTime<A2, Z>
pub fn to_calendar<A2: AsCalendar>( &self, calendar: A2, ) -> CustomZonedDateTime<A2, Z>
Convert the CustomZonedDateTime to a CustomZonedDateTime in a different calendar
Trait Implementations§
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