Trait pfmt::FormatTable

source ·
pub trait FormatTable<'a> {
    type Item: Fmt;

    fn get_fmt(&'a self, name: &str) -> Option<Self::Item>;

    fn format(&'a self, input: &str) -> Result<String, FormattingError> { ... }
}
Expand description

A collection or producer of format units.

Required Associated Types

Required Methods

Produce or retrieve a format unit with the given name stem.

Provided Methods

Perform formatting of a format string.

This method is not meant to be overridden. You can, but you would have to reimplement format strings parser yourself.

Implementations on Foreign Types

This implementation recognizes placeholders with string names stored in the hash map.

This implementation recognizes placeholders with string names (represented by string slices) stored in the hash map.

This implementation recognizes placeholders which names are valid integer indices into the vector.

This implementation first uses the first table to look up placeholders’ names, and then the second.

This implementation looks up placeholders’ names consecutively in three tables.

This implementation looks up placeholders’ names consecutively in four tables.

This implementation looks up placeholders’ names consecutively in five tables.

This implementation looks up placeholders’ names consecutively in six tables.

Implementors