Adapter Pattern in Rust: Overcoming the Orphan Rule with Newtype and Extension Traits (opens in new tab)
Some time ago, we were talking about the Newtype pattern in the Rust programming language. For that pattern, we used a single-field tuple struct to either alter the inner type semantics or to hide the implementation type from the end user - often we wanted both. This time, we will also take a closer look into the single-field tuple struct, this tim...
Read the original article