In the 2 weeks I’ve been learning about Rust, Traits started off to me as being “interfaces” that certain structs implement.
But now being exposed to some type signatures that use Traits as a way to specify “all types that satisfy this Trait”, my understanding has become less (or more?) clear.
I think there are a few people thinking the same. Traits seem to be multipurpose.
And then it comes to compilation. When I think about it…Traits seem to only exist at the type/compiler level, and are not actually a thing when compiled. But this is just a thought, nothing concrete.
Am I on the right path here with my line of thinking?
Or is there more to it? Are Traits tangible code in assembly?
Usually I would ask this type of question in ##rust-beginners but I think this is something to be addressed on a more public and persistent medium.