traits

  • 11th May 2026

TIL about Zero-sized Types in Rust.

I was reading my timeline on BlueSky, and stumbled upon this article about some Rust library that got rewritten. While the hpke-ng library itself is nice and interesting in itself, it was not the main thing I got out ot if.

It was a nice explanation of a concept I’ve seen before in various Rust libraries: Zero-sized types. And the associated

traits that go with these.

Read more