k8s-openapi
k8s-openapi copied to clipboard
need impl Metadata for PodTemplateSpec
I'm attempting to write code that is generic over types that implement k8s_openapi::Metadata<Ty = ObjectMeta>
. PodTemplateSpec
could fit into this category but doesn't. When I try to write an impl of my trait with a bound on k8s_openapi::Metadata
AND try to impl it directly for PodTemplateSpec
, I get a compiler error indicating not that there is an existing implementation conflict, but that there could in a future release be an impl Metadata<Ty = ObjectMeta> for PodTemplateSpec
, which doesn't leave me with any particularly good options other than to discard the implementation of my trait bounded by this crate's Metadata
and instead write discrete impls for each type that I use...or write my own macro for it.
I think the simplest solution for me would be if it were possible to generate an impl Metadata for PodTemplateSpec
in this crate. Is that something the maintainers would be open to? It's not obvious to me where this should go since the existing impl Metadata for <TYPE>
seems to be based on top-level k8s API objects that have an api version, kind, group, etc. Otherwise I would have just opened a PR right away.