2 ms·
There are lots of things that interfaces are sufficient for, but Rust libraries also have an option of using procedural macros, operator overloading, and (the b
by pornel 7y ago
There are lots of things that interfaces are sufficient for, but Rust libraries also have an option of using procedural macros, operator overloading, and (the beaten dead horse) generics.
Rust uses these features for smaller things like faster hashmaps, custom strings (e.g. on stack, interned), iterator adapters, or custom channels. `defer` is provided via a library in Rust.