Crate format_xml
source · [−]Expand description
Fast, minimal, feature-rich, xml-like formatting syntax for Rust!
We say xml-like because due to limitations and flexibility some concessions had to be made.
Features include:
- Arbitrary expressions inside the formatting braces
- Generates optimized Rust code at compiletime
- Auto-escaping control characters.
- Supports rust-analyzer auto complete, refactoring and more!
- Supports Rust’s standard formatting specifiers
- Control flow allows conditional and repeated formatting
- Capture variables by value or by reference
- Escape hatch to inject custom formatting code
See xfmt!
for more information.
Macros
Replaces eprint!
using xfmt syntax.
Replaces eprintln!
using xfmt syntax.
Extended formatting syntax.
Replaces format!
using xfmt syntax.
Replaces format_args!
using xfmt syntax.
Joins the arguments in a displayable object.
Replaces panic!
using xfmt syntax.
Replaces print!
using xfmt syntax.
Replaces println!
using xfmt syntax.
Replaces write!
using xfmt syntax.
Replaces writeln!
using xfmt syntax.
Xml-like formatting syntax.
Structs
Escapes <
, &
, >
, '
, "
when it appears in the formatted string.
Escapes <
, &
, >
when it appears in the formatted string.