Ben Chuanlong Du's Blog

It is never too late to learn.

The Deref Trait in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. In short, do NOT implement the Deref trait unless you are absolutely sure that it's needed! According to Rust Official Doc - Deref, Deref should only be implemented for smart pointers. The …

Hands on Box in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!