Draft: Switch to traits instead of full in-struct implementation
We should rely on the trait bounds instead of manual implementation.
By doing it this way, we can ensure that the nesting of types will work and give the user the ability to implement the trait manually by giving access to the ToBytes
and FromBytes
for the underlying types.