Trait elastic::types::document::FieldType [] [src]

pub trait FieldType<M, F> where
    F: Default,
    M: FieldMapping<F>, 
{ fn mapping() -> M { ... } }

The base representation of an Elasticsearch data type.

FieldType is the main trait you need to care about when building your own Elasticsearch types. Each type has two generic arguments that help define its mapping:

  • A mapping type, which implements FieldMapping
  • A format type, which is usually (). Types with multiple formats, like Date, can use the format in the type definition.

Links

Provided Methods

Get the mapping for this type.

Implementors