{:?} (debug)
Prints arrays/structs in an inspectable format.
Syntax
println!("{:?}", value)Description
{:?} is used to print structures like Vec, tuples, etc. ({} does not work for them).
Example
Loading editor…
Expected output
[1, 2, 3]
When to use?
Array/struct debugging.