To make ForkVersionDeserialize even more type safe, we could remove the requirement that types implementing the trait also implement DeserializeOwned. If we have a type that needs fork info to deserialize correctly, it is probably a footgun for this type to also implement Deserialize, because that will bypass the fork-aware deserialization.
To make this viable we would need to:
- Remove the bound from
ForkVersionDeserialize
- Make the
version field mandatory in ForkVersionedResponse and ensure there is no unintended fallout of making this change.
To make
ForkVersionDeserializeeven more type safe, we could remove the requirement that types implementing the trait also implementDeserializeOwned. If we have a type that needs fork info to deserialize correctly, it is probably a footgun for this type to also implementDeserialize, because that will bypass the fork-aware deserialization.To make this viable we would need to:
ForkVersionDeserializeversionfield mandatory inForkVersionedResponseand ensure there is no unintended fallout of making this change.