Crate rformat

Crate rformat 

Source
Expand description

rformat: A flexible runtime formatting library for Rust, supporting custom and standard formatting traits.

This crate provides a formatting engine similar to Rust’s standard formatting macros, but with extensibility for custom types and formatting behaviors.

Unlike Rust’s built-in formatting macros, rformat parses the format string at runtime. This means you can generate or modify the format specification dynamically at runtime, rather than being limited to hardcoded, compile-time format strings. This enables advanced use cases such as user-driven formatting, dynamic templates, or runtime format spec construction.

§Modules

  • error: Error types for formatting operations
  • fmt: Formatting engine and traits
  • formattable: Type-erased wrapper for formattable values
  • prelude: Commonly used traits and macros

Modules§

error
Error types for formatting operations.
fmt
Formatting engine and traits for custom formatting.
format_spec
formattable
Type-erased wrapper for formattable values.
prelude
Commonly used traits and macros for convenient imports.

Macros§

__into_formattable
_param
Creates a formatting parameter from an expression.
_params
Creates a vector of formatting parameters.
_rformat
Macro for formatting strings at runtime using rformat’s formatting engine.
match_format
Macro to match format specification combinations and generate the correct format string.