Sealed

Trait Sealed 

Source
pub trait Sealed {
    // Required method
    fn format_into(
        &self,
        output: &mut (impl Write + ?Sized),
        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 + ?Sized), 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Sealed for [BorrowedFormatItem<'_>]

Source§

fn format_into( &self, output: &mut (impl Write + ?Sized), 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 + ?Sized), date: Option<Date>, time: Option<Time>, offset: Option<UtcOffset>, ) -> Result<usize, Format>

Implementors§

Source§

impl Sealed for BorrowedFormatItem<'_>

Source§

impl Sealed for OwnedFormatItem

Source§

impl Sealed for Rfc2822

Source§

impl Sealed for Rfc3339

Source§

impl<T> Sealed for T
where T: Deref<Target: Sealed>,

Source§

impl<const CONFIG: EncodedConfig> Sealed for Iso8601<CONFIG>