RUST OUTPUT, MAPPED
Print. Format. Inspect.
A fast, visual reference for how Rust turns values into output. Built between std::fmt and the editor tab you are working in.
● SOURCE-BACKED● CI-CHECKED
STD::FMT
FORMAT_SPECPARSED
LEFT → RIGHT
QUICK REFERENCE
FORMAT_SPECPARSED
LEFT → RIGHT
{:>10.2}
separatoralignwidthprecision
VALUE → FORMATTER → OUTPUTRUSTPRINTQUICK REFERENCE
01 / FORMAT
Format
Read the language inside Rust replacement fields.
- Display and Debug
- width and precision
- alignment and fill
- numeric representations
02 / OUTPUT
Output
Choose the right macro and destination.
- print! and println!
- stderr and flushing
- write! and writeln!
- format! and format_args!
03 / DEBUG
Debug output
Inspect values while your program runs.
- dbg!
- Debug vs Display
- pretty Debug
- custom implementations
04 / REFERENCE
Reference
A fast map for the syntax you half-remember.
- formatting cheat sheet
- formatting traits
- macro matrix
- type compatibility
Start here
Open full cheat sheet →ToolSOURCE-BACKED
Rust Format Explorer
Paste {:>10.2}, see every token, then copy the matching Rust expression.
parserstd::fmtinteractive
ReferenceEXAMPLES CI-CHECKED
Formatting cheat sheet
The bookmarkable map from {} and {:?} to dynamic width and precision.
syntaxexamplesquick lookup
OutputSOURCE-BACKED
Where output goes
Compare stdout, stderr, String, buffers, locking, and flushing.
stdoutstderrWrite
DebugSOURCE-BACKED
Inspect values with dbg!
What dbg! prints, where it writes, and what happens to ownership.
dbg!Debugstderr
EVIDENCE, NOT A HALO
Each claim says what supports it.
SOURCE-BACKED means the page cites and is grounded in official Rust documentation. CI-CHECKED means the exact repository example passes Rust CI.
format_output.rs
1 let value = 42;
2 let output = format!("{value:#06x}");
3 assert_eq!(output, "0x002a");