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§
- eprint
- Replaces
eprint!
using xfmt syntax. - eprintln
- Replaces
eprintln!
using xfmt syntax. - fmt
- Extended formatting syntax.
- format
- Replaces
format!
using xfmt syntax. - format_
args - Replaces
format_args!
using xfmt syntax. - join
- Joins the arguments in a displayable object.
- panic
- Replaces
panic!
using xfmt syntax. - Replaces
print!
using xfmt syntax. - println
- Replaces
println!
using xfmt syntax. - write
- Replaces
write!
using xfmt syntax. - writeln
- Replaces
writeln!
using xfmt syntax. - xfmt
- Xml-like formatting syntax.
Structs§
- Escape
Attr Value - Escapes
<
,&
,>
,'
,"
when it appears in the formatted string. - Escape
Text - Escapes
<
,&
,>
when it appears in the formatted string.