Debug formatting
The programmer-facing way to print a value, with {:?}.
{:?} uses a type's Debug form (quotes on text; tuples, arrays and Results print); {} uses Display, the user-facing form.
Examples
println!("{:?}", vec![3, 1, 2])prints[3, 1, 2], and{:?}on aStringshows its quotes and escapes, as in"Ferris\n".
See also