Trait Format

Source
pub trait Format {
    const PLACEHOLDERS: (&'static str, &'static str) = _;

    // Provided method
    fn format(&self, template: impl Into<String>) -> String
       where Self: Serialize { ... }
}
Expand description

A simple formatter with customizable placeholders

Provided Associated Constants§

Source

const PLACEHOLDERS: (&'static str, &'static str) = _

Left and right placeholders for variables

Provided Methods§

Source

fn format(&self, template: impl Into<String>) -> String
where Self: Serialize,

Formats the struct using the template

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§