Trait Fields

Source
pub trait Fields {
    // Required method
    fn fields() -> &'static [&'static str];
}
Expand description

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.

Required Methods§

Source

fn fields() -> &'static [&'static str]

Get the list of names of fields of the struct.

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§