1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[cfg(feature = "macro")]
pub use metastruct_macro::metastruct;

/// Trait for structs with a countable number of fields.
///
/// The `Selector` type can be used to select different subsets of fields.
///
/// Implementations of this trait are intended to be written using the `metastruct` macro
/// and the `num_fields` attribute.
pub trait NumFields<Selector> {
    const NUM_FIELDS: usize;
}

pub mod selectors {
    #[derive(Debug, Clone, Copy, PartialEq, Eq)]
    pub enum AllFields {}
}