pub trait FormatWithVars {
    // Required method
    fn format_with<FUN>(
        &self,
        f: &mut Formatter<'_>,
        variable_format: FUN
    ) -> Result
       where FUN: FnMut(&mut Formatter<'_>, Variable) -> Result;

    // Provided method
    fn format_debug(&self, f: &mut Formatter<'_>) -> Result { ... }
}
Expand description

An element that can be displayed if you give a variable display function

Required Methods§

source

fn format_with<FUN>( &self, f: &mut Formatter<'_>, variable_format: FUN ) -> Result
where FUN: FnMut(&mut Formatter<'_>, Variable) -> Result,

Write the element to the formatter. See std::fmt::Display

Provided Methods§

source

fn format_debug(&self, f: &mut Formatter<'_>) -> Result

Write the elements, naming the variables v0, v1, … vn

Object Safety§

This trait is not object safe.

Implementors§