Skip to main content

Sealed

Trait Sealed 

Source
pub trait Sealed: ComputeMetadata {
    // Required method
    fn format_into<V>(
        &self,
        output: &mut (impl Write + ?Sized),
        value: &V,
        state: &mut V::State,
    ) -> Result<usize, Format>
       where V: ComponentProvider;

    // Provided method
    fn format<V>(
        &self,
        value: &V,
        state: &mut V::State,
    ) -> Result<String, Format>
       where V: ComponentProvider { ... }
}
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<V>( &self, output: &mut (impl Write + ?Sized), value: &V, state: &mut V::State, ) -> Result<usize, Format>

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

Provided Methods§

Source

fn format<V>(&self, value: &V, state: &mut V::State) -> 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".

Implementations on Foreign Types§

Source§

impl Sealed for [BorrowedFormatItem<'_>]

Source§

fn format_into<V>( &self, output: &mut (impl Write + ?Sized), value: &V, state: &mut V::State, ) -> Result<usize, Format>

Source§

impl Sealed for [OwnedFormatItem]

Source§

fn format_into<V>( &self, output: &mut (impl Write + ?Sized), value: &V, state: &mut V::State, ) -> Result<usize, Format>

Implementors§