Function elastic_types_derive_internals::elastic_type::expand_derive [] [src]

pub fn expand_derive(
    crate_root: Tokens,
    input: &MacroInput
) -> Result<Vec<Tokens>, DeriveElasticTypeError>

Derive DocumentType for the given input.

The input must satisfy the following rules:

  • It must be a struct.
  • The structs field types must implement FieldType (or be ignored).
  • A mapping type supplied by #[elastic(mapping="<ident>")] must implement DocumentMapping, but not PropertiesMapping.