also publish on pypi

This commit is contained in:
Wim Pomp
2025-04-30 12:52:12 +02:00
parent a3a40fecb4
commit cbb135e13e
4 changed files with 122 additions and 3 deletions

View File

@@ -2778,6 +2778,7 @@ macro_rules! impl_enum_variants {
($($t:ty $(,)?)*) => {
$(
impl $t {
/// all possible variants of this enum that can be constructed or converted into
pub fn variants() -> Vec<Self> {
Self::iter().collect::<Vec<_>>()
}