Trait elastic::types::prelude::DocumentType
[−]
[src]
pub trait DocumentType { type Mapping: DocumentMapping; fn name() -> &'static str { ... } fn field_mapping() -> Self::Mapping { ... } fn index_mapping() -> IndexDocumentMapping<Self::Mapping> { ... } }
The additional fields available to an indexable Elasticsearch type.
This trait is implemented for the type being mapped, rather than the mapping type itself.
Associated Types
type Mapping: DocumentMapping
The mapping type for this document.
Provided Methods
fn name() -> &'static str
Get the name for this type.
This is a convenience method that returns the name
of the bound DocumentMapping
.
fn field_mapping() -> Self::Mapping
Get a serialisable instance of the type mapping as a field.
fn index_mapping() -> IndexDocumentMapping<Self::Mapping>
Get a serialisable instance of the type mapping as an indexable type
Implementations on Foreign Types
impl<TDocument, TMapping> DocumentType for Mutex<TDocument> where
TDocument: DocumentType<Mapping = TMapping> + Serialize,
TMapping: DocumentMapping,
[src]
TDocument: DocumentType<Mapping = TMapping> + Serialize,
TMapping: DocumentMapping,
type Mapping = TMapping
fn name() -> &'static str
[src]
fn field_mapping() -> Self::Mapping
[src]
fn index_mapping() -> IndexDocumentMapping<Self::Mapping>
[src]
impl DocumentType for Value
[src]
type Mapping = ValueDocumentMapping
fn name() -> &'static str
[src]
fn field_mapping() -> Self::Mapping
[src]
fn index_mapping() -> IndexDocumentMapping<Self::Mapping>
[src]
impl<'a, TDocument, TMapping> DocumentType for &'a TDocument where
TDocument: DocumentType<Mapping = TMapping> + Serialize,
TMapping: DocumentMapping,
[src]
TDocument: DocumentType<Mapping = TMapping> + Serialize,
TMapping: DocumentMapping,
type Mapping = TMapping
fn name() -> &'static str
[src]
fn field_mapping() -> Self::Mapping
[src]
fn index_mapping() -> IndexDocumentMapping<Self::Mapping>
[src]
impl<'a, TDocument, TMapping> DocumentType for Cow<'a, TDocument> where
TDocument: DocumentType<Mapping = TMapping> + Serialize + Clone,
TMapping: DocumentMapping,
[src]
TDocument: DocumentType<Mapping = TMapping> + Serialize + Clone,
TMapping: DocumentMapping,
type Mapping = TMapping
fn name() -> &'static str
[src]
fn field_mapping() -> Self::Mapping
[src]
fn index_mapping() -> IndexDocumentMapping<Self::Mapping>
[src]
impl<TDocument, TMapping> DocumentType for RwLock<TDocument> where
TDocument: DocumentType<Mapping = TMapping> + Serialize,
TMapping: DocumentMapping,
[src]
TDocument: DocumentType<Mapping = TMapping> + Serialize,
TMapping: DocumentMapping,