generic

  • 19th May 2021

Constrain Struct Generic Field in Rust

It is a quite common need to constrain struct generic field to certain types in Rust. We usually have two different ways to implement this. Trait or dispatching each of them by ourselves.

Read more