This PR introduces 2 new pieces of functionality around ApiKey
These were required to implement a unit test in my project that compares the currently supported versions of the project against the supported versions of the kafka-protocol crate.
The additions are:
Add ApiKey::iterate_all() function, it returns an iterator that iterates once over every ApiKey variant
Add ApiKey::valid_versions(&self) method, it returns the valid versions that can be used with this ApiKey variant.
I'm happy to split the PR in two if one of these is easy to land and the other is not.
This PR introduces 2 new pieces of functionality around ApiKey These were required to implement a unit test in my project that compares the currently supported versions of the project against the supported versions of the kafka-protocol crate.
The additions are:
ApiKey::iterate_all()
function, it returns an iterator that iterates once over every ApiKey variantApiKey::valid_versions(&self)
method, it returns the valid versions that can be used with this ApiKey variant.I'm happy to split the PR in two if one of these is easy to land and the other is not.