1
2
3
4
5
6
7
8
9
/// A trait that provides access to the list of named fields of a struct
/// represented as string literals.
///
/// This trait is not intended to be implemented manually. Instead,
/// use the `#[derive(Fields)]` macro from `extruct` library.
pub trait Fields {
    /// Get the list of names of fields of the struct.
    fn fields() -> &'static [&'static str];
}