Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible to call Encode/Decode on a subclass of a cluster-obj…
…ect struct. (#11014) Our enable_if machinery for Encode/Decode only worked for structs of type T if there was a T::Encode method. That made it impossible to subclass a struct (e.g. with the subclass providing backing storage for the struct's Spans) and call Encode on the subclass instance without jumping through some sort of testing hoops. This change changes our test from "T::Encode exists with the right signature" to "an instance of T has a .Encode that when called with the right arguments returns the right return type", which lets subclassing work as desired.
- Loading branch information