quork 0.9.1

A collection of small things that don't deserve their own crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![allow(clippy::module_name_repetitions)]
//! Listing all Variants of an enum

#[cfg(feature = "macros")]
pub use crate::macros::ListVariants;

/// A trait listing all Variants of an enum
///
/// This can technically be implemented for nearly anything, but it is designed for enums, in conjunction with the associated derive macro
pub trait ListVariants<const N: usize>
where
    Self: Sized,
{
    /// All variants of the enum
    const VARIANTS: [Self; N];
}