DisplayWith

Trait DisplayWith 

Source
pub trait DisplayWith {
    // Required method
    fn fmt_with(&self, interner: &Interner, f: &mut Formatter<'_>) -> Result;

    // Provided method
    fn with<'a>(&'a self, interner: &'a Interner) -> WithInterner<'a, Self> { ... }
}
Expand description

Trait for formatting types that require an interner for symbol resolution.

Required Methods§

Source

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

Provided Methods§

Source

fn with<'a>(&'a self, interner: &'a Interner) -> WithInterner<'a, Self>

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.

Implementors§