Display
We'll cover the following...
We'll cover the following...
Using the format macro, I can write a function that turns an i32 into a String:
But we’re all about type parameters these days. Can we generalize this to any type T?
Not like that apparently:
error[E0277]: `T` doesn't implement `std::fmt::Display`
--> src/main.rs:2:19
|
2 | format!("{}", x)
| ^ `T` cannot be formatted with the default formatter
...