pub(super) struct DateTimePrinter {
lowercase: bool,
separator: u8,
precision: Option<u8>,
}Fields§
§lowercase: bool§separator: u8§precision: Option<u8>Implementations§
Source§impl DateTimePrinter
impl DateTimePrinter
pub(super) const fn new() -> DateTimePrinter
pub(super) const fn lowercase(self, yes: bool) -> DateTimePrinter
pub(super) const fn separator(self, ascii_char: u8) -> DateTimePrinter
pub(super) const fn precision(self, precision: Option<u8>) -> DateTimePrinter
pub(super) fn print_zoned( &self, zdt: &Zoned, wtr: &mut dyn Write, ) -> Result<(), Error>
fn print_zoned_buf(&self, zdt: &Zoned, bbuf: &mut BorrowedBuffer<'_>)
fn print_zoned_wtr( &self, zdt: &Zoned, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
pub(super) fn print_timestamp( &self, timestamp: &Timestamp, wtr: &mut dyn Write, ) -> Result<(), Error>
fn print_timestamp_buf( &self, timestamp: &Timestamp, bbuf: &mut BorrowedBuffer<'_>, )
pub(super) fn print_timestamp_with_offset( &self, timestamp: &Timestamp, offset: Offset, wtr: &mut dyn Write, ) -> Result<(), Error>
fn print_timestamp_with_offset_buf( &self, timestamp: &Timestamp, offset: Offset, bbuf: &mut BorrowedBuffer<'_>, )
pub(super) fn print_datetime( &self, dt: &DateTime, wtr: &mut dyn Write, ) -> Result<(), Error>
fn print_datetime_buf(&self, dt: &DateTime, bbuf: &mut BorrowedBuffer<'_>)
fn print_datetime_wtr( &self, dt: &DateTime, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
pub(super) fn print_date( &self, date: &Date, wtr: &mut dyn Write, ) -> Result<(), Error>
fn print_date_buf(&self, date: &Date, bbuf: &mut BorrowedBuffer<'_>)
fn print_date_wtr( &self, date: &Date, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
pub(super) fn print_time( &self, time: &Time, wtr: &mut dyn Write, ) -> Result<(), Error>
fn print_time_buf(&self, time: &Time, bbuf: &mut BorrowedBuffer<'_>)
fn print_time_wtr( &self, time: &Time, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
pub(super) fn print_time_zone<W: Write>( &self, tz: &TimeZone, wtr: W, ) -> Result<(), Error>
fn print_time_zone_wtr( &self, tz: &TimeZone, wtr: &mut dyn Write, ) -> Result<(), Error>
pub(super) fn print_pieces<W: Write>( &self, pieces: &Pieces<'_>, wtr: W, ) -> Result<(), Error>
fn print_pieces_wtr( &self, pieces: &Pieces<'_>, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
pub(super) fn print_iso_week_date( &self, iso_week_date: &ISOWeekDate, wtr: &mut dyn Write, ) -> Result<(), Error>
fn print_iso_week_date_buf( &self, iso_week_date: &ISOWeekDate, bbuf: &mut BorrowedBuffer<'_>, )
fn print_pieces_offset( &self, poffset: &PiecesOffset, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
Sourcefn print_offset_rounded_buf(
&self,
offset: &Offset,
bbuf: &mut BorrowedBuffer<'_>,
)
fn print_offset_rounded_buf( &self, offset: &Offset, bbuf: &mut BorrowedBuffer<'_>, )
Formats the given offset into the writer given.
If the given offset has non-zero seconds, then they are rounded to the nearest minute.
Sourcefn print_offset_rounded_wtr(
&self,
offset: &Offset,
wtr: &mut BorrowedWriter<'_, '_, '_>,
) -> Result<(), Error>
fn print_offset_rounded_wtr( &self, offset: &Offset, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
Formats the given offset into the writer given.
If the given offset has non-zero seconds, then they are rounded to the nearest minute.
Sourcefn print_offset_full_precision(
&self,
offset: &Offset,
bbuf: &mut BorrowedBuffer<'_>,
)
fn print_offset_full_precision( &self, offset: &Offset, bbuf: &mut BorrowedBuffer<'_>, )
Formats the given offset into the writer given.
If the given offset has non-zero seconds, then they are emitted as a
third :-delimited component of the offset. If seconds are zero, then
only the hours and minute components are emitted.
Sourcefn print_zulu_buf(&self, bbuf: &mut BorrowedBuffer<'_>)
fn print_zulu_buf(&self, bbuf: &mut BorrowedBuffer<'_>)
Prints the “zulu” indicator.
This should only be used when the offset is not known. For example,
when printing a Timestamp.
Sourcefn print_zulu_wtr(
&self,
wtr: &mut BorrowedWriter<'_, '_, '_>,
) -> Result<(), Error>
fn print_zulu_wtr( &self, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
Prints the “zulu” indicator.
This should only be used when the offset is not known. For example,
when printing a Timestamp.
Sourcefn print_time_zone_annotation_buf(
&self,
time_zone: &TimeZone,
offset: &Offset,
bbuf: &mut BorrowedBuffer<'_>,
)
fn print_time_zone_annotation_buf( &self, time_zone: &TimeZone, offset: &Offset, bbuf: &mut BorrowedBuffer<'_>, )
Formats the given time zone name into the writer given as an RFC 9557 time zone annotation.
When the given time zone is not an IANA time zone name, then the offset is printed instead. (This means the offset will be printed twice, which is indeed an intended behavior of RFC 9557 for cases where a time zone name is not used or unavailable.)
Sourcefn print_time_zone_annotation_wtr(
&self,
time_zone: &TimeZone,
offset: &Offset,
wtr: &mut BorrowedWriter<'_, '_, '_>,
) -> Result<(), Error>
fn print_time_zone_annotation_wtr( &self, time_zone: &TimeZone, offset: &Offset, wtr: &mut BorrowedWriter<'_, '_, '_>, ) -> Result<(), Error>
Formats the given time zone name into the writer given as an RFC 9557 time zone annotation.
When the given time zone is not an IANA time zone name, then the offset is printed instead. (This means the offset will be printed twice, which is indeed an intended behavior of RFC 9557 for cases where a time zone name is not used or unavailable.)
Trait Implementations§
Source§impl Clone for DateTimePrinter
impl Clone for DateTimePrinter
Source§fn clone(&self) -> DateTimePrinter
fn clone(&self) -> DateTimePrinter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more