Struct icu_datetime::time_zone::Iso8601Format
source · pub(crate) struct Iso8601Format {
format: IsoFormat,
minutes: IsoMinutes,
seconds: IsoSeconds,
}
Fields§
§format: IsoFormat
§minutes: IsoMinutes
§seconds: IsoSeconds
Trait Implementations§
source§impl Clone for Iso8601Format
impl Clone for Iso8601Format
source§fn clone(&self) -> Iso8601Format
fn clone(&self) -> Iso8601Format
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Iso8601Format
impl Debug for Iso8601Format
source§impl FormatTimeZone for Iso8601Format
impl FormatTimeZone for Iso8601Format
source§fn format<W: PartsWrite + ?Sized>(
&self,
sink: &mut W,
time_zone: &impl TimeZoneInput,
data_payloads: &TimeZoneDataPayloads,
) -> Result<Result, DateTimeError>
fn format<W: PartsWrite + ?Sized>( &self, sink: &mut W, time_zone: &impl TimeZoneInput, data_payloads: &TimeZoneDataPayloads, ) -> Result<Result, DateTimeError>
Tries to write the timezone to the sink. If a DateTimeError is returned, the sink
has not been touched, so another format can be attempted.
source§impl FormatTimeZoneWithFallback for Iso8601Format
impl FormatTimeZoneWithFallback for Iso8601Format
source§fn format_gmt_offset<W: PartsWrite + ?Sized>(
&self,
sink: &mut W,
gmt_offset: GmtOffset,
_data_payloads: &TimeZoneDataPayloads,
) -> Result
fn format_gmt_offset<W: PartsWrite + ?Sized>( &self, sink: &mut W, gmt_offset: GmtOffset, _data_payloads: &TimeZoneDataPayloads, ) -> Result
Writes a GmtOffset
in ISO-8601 format according to the
given formatting options.
IsoFormat
determines whether the format should be Basic or Extended,
and whether a zero-offset should be formatted numerically or with
The UTC indicator: “Z”
- Basic e.g. +0800
- Extended e.g. +08:00
IsoMinutes
can be required or optional.
IsoSeconds
can be optional or never.
source§fn format_with_last_resort_fallback<W: PartsWrite + ?Sized>(
&self,
sink: &mut W,
time_zone: &impl TimeZoneInput,
data_payloads: &TimeZoneDataPayloads,
) -> Result<Result<(), DateTimeError>, Error>
fn format_with_last_resort_fallback<W: PartsWrite + ?Sized>( &self, sink: &mut W, time_zone: &impl TimeZoneInput, data_payloads: &TimeZoneDataPayloads, ) -> Result<Result<(), DateTimeError>, Error>
Formats the GMT offset, or falls back to a fallback string. This does
lossy writing, so even in the Ok(Err(_)) case, something has been written.
source§impl PartialEq for Iso8601Format
impl PartialEq for Iso8601Format
source§fn eq(&self, other: &Iso8601Format) -> bool
fn eq(&self, other: &Iso8601Format) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for Iso8601Format
impl StructuralPartialEq for Iso8601Format
Auto Trait Implementations§
impl Freeze for Iso8601Format
impl RefUnwindSafe for Iso8601Format
impl Send for Iso8601Format
impl Sync for Iso8601Format
impl Unpin for Iso8601Format
impl UnwindSafe for Iso8601Format
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