TIL you can borrow traits in @rustlang. I always thought you needed to use generics! This is huge, since I assume trait references are more efficient as well!
-
-
Just referencing a trait directly, without using any form of templating. trait Test {} fn test(ref: &Test) {}
-
Ah yeah, so, that’s a “trait object” and if it’s more efficient or not really depends. Smaller binaries, slower function call.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.