Trait NumFields

Source
pub trait NumFields<Selector> {
    const NUM_FIELDS: usize;
}
Expand description

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.

Required Associated Constants§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§