Skip to main content

FmtIteratorExt

Trait FmtIteratorExt 

Source
pub trait FmtIteratorExt: Iterator + Sized {
    // Provided methods
    fn format<'a>(self, separator: &'a str) -> Format<'a, Self>
       where Self::Item: Display { ... }
    fn format_with<'a, F>(
        self,
        separator: &'a str,
        format: F,
    ) -> FormatWith<'a, Self, F>
       where F: FnMut(&mut Formatter<'_>, Self::Item) -> Result { ... }
}
Expand description

Iterator formatting helpers.

Provided Methods§

Source

fn format<'a>(self, separator: &'a str) -> Format<'a, Self>
where Self::Item: Display,

Formats each item separated by separator.

Source

fn format_with<'a, F>( self, separator: &'a str, format: F, ) -> FormatWith<'a, Self, F>
where F: FnMut(&mut Formatter<'_>, Self::Item) -> Result,

Formats each item separated by separator, using format for each item.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§