An Optimization That’s Impossible in Rust! | ltungv

In this article, I’ll describe how I implemented German string and the challenges of doing so in Rust. Specifically, I’ll examine how to enable shared ownership for such data structure. Providing unique ownership is relatively trivial, and there is already a nicely written tutorial from the Rustonomicon teaching you how to [implement a `Vec`], which is not much different from a `String`. But first, let’s talk about the concept of German string.