C++ classes are types. Rust traits are applied to types.
And what exactly do you think traits apply to types exactly?
If your answer doesn't start with an "m" and end with a "ethod", then you may need to re-read the Rust book found here:
https://doc.rust-lang.org/book/ch10-02-traits.html
And what exactly do you think traits apply to types exactly?
If your answer doesn't start with an "m" and end with a "ethod", then you may need to re-read the Rust book found here:
https://doc.rust-lang.org/book/ch10-02-traits.html