Trait time::formatting::formattable::sealed::Sealed

source ·
pub trait Sealed {
    // Required method
    fn format_into(
        &self,
        output: &mut impl Write,
        date: Option<Date>,
        time: Option<Time>,
        offset: Option<UtcOffset>
    ) -> Result<usize, Format>;

    // Provided method
    fn format(
        &self,
        date: Option<Date>,
        time: Option<Time>,
        offset: Option<UtcOffset>
    ) -> Result<String, Format> { ... }
}
Available on crate feature formatting only.
Expand description

Format the item using a format description, the intended output, and the various components.

Required Methods§

source

fn format_into( &self, output: &mut impl Write, date: Option<Date>, time: Option<Time>, offset: Option<UtcOffset> ) -> Result<usize, Format>

Format the item into the provided output, returning the number of bytes written.

Provided Methods§

source

fn format( &self, date: Option<Date>, time: Option<Time>, offset: Option<UtcOffset> ) -> Result<String, Format>

Format the item directly to a String.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sealed for [BorrowedFormatItem<'_>]

source§

fn format_into( &self, output: &mut impl Write, date: Option<Date>, time: Option<Time>, offset: Option<UtcOffset> ) -> Result<usize, Format>

source§

impl Sealed for [OwnedFormatItem]

source§

fn format_into( &self, output: &mut impl Write, date: Option<Date>, time: Option<Time>, offset: Option<UtcOffset> ) -> Result<usize, Format>

Implementors§