Skip to main content

Formatter

Trait Formatter 

Source
pub trait Formatter {
    // Required method
    fn format(&self, level: Level, text: &str) -> String;
}
Expand description

Turn one phrase into cleaned text at a given level. Implementors do ONLY their transform — the deterministic pre-layer and the diff-guard are applied by guarded_format, never here. (So a formatter receives already-pre-processed text and must not re-apply spoken commands / backtrack.)

Required Methods§

Source

fn format(&self, level: Level, text: &str) -> String

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§