pub(crate) trait FormatTimeZoneWithFallback {
    // Required method
    fn format_gmt_offset<W: PartsWrite + ?Sized>(
        &self,
        sink: &mut W,
        gmt_offset: GmtOffset,
        _data_payloads: &TimeZoneDataPayloads,
    ) -> Result;

    // Provided method
    fn format_with_last_resort_fallback<W: PartsWrite + ?Sized>(
        &self,
        sink: &mut W,
        time_zone: &impl TimeZoneInput,
        data_payloads: &TimeZoneDataPayloads,
    ) -> Result<Result<(), DateTimeError>, Error> { ... }
}

Required Methods§

source

fn format_gmt_offset<W: PartsWrite + ?Sized>( &self, sink: &mut W, gmt_offset: GmtOffset, _data_payloads: &TimeZoneDataPayloads, ) -> Result

Provided Methods§

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>

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.

Object Safety§

This trait is not object safe.

Implementors§