Arnavion / k8s-openapi

Rust definitions of the resource types in the Kubernetes client API
Apache License 2.0
384 stars 41 forks source link

Feature helper macros for version ranges #16

Closed Arnavion closed 6 years ago

Arnavion commented 6 years ago

#[cfg(feature = "v1_9")] works for selecting v1.9, but selecting a range like >= v1.9 requires enumerating every such version manually.

Possible define macros like ge_1_9!() and lt_1_9!() (or const fns) that are always available and expand to true or false depending on what features are enabled.