3 ms·
Implementing `Deref` in Rust implements deref coercions, meaning that it can be used in any function that can accept an appropriate reference. This is purely s
by Blikkentrekker 6y ago
Implementing `Deref` in Rust implements deref coercions, meaning that it can be used in any function that can accept an appropriate reference.
This is purely syntactic sugar, and no different the compiler inserting `x.deref()` instead of `x` for function arguments. — it's simple q.o.l..