"Metadata methods" now have a generic fallback which returns an "empty" result for any type that doesn't overload them. They are also no longer generated for structs which don't need them.
oneof_field_types now also returns a named tuple instance instead of NamedTuple type representing the names and types of oneof options. This has the benefit of providing a nicer syntax for accessing the types, e.g.
oneof_field_types(MyType).oneof_field_name.option_name # returns type corresponding to `option_name`
"Metadata methods" now have a generic fallback which returns an "empty" result for any type that doesn't overload them. They are also no longer generated for structs which don't need them.
oneof_field_types
now also returns a named tuple instance instead of NamedTuple type representing the names and types ofoneof
options. This has the benefit of providing a nicer syntax for accessing the types, e.g.