[−][src]Trait elastic_types::document::prelude::DocumentType
An indexable Elasticsearch type.
This trait is implemented for the type being mapped, rather than the mapping type itself.
Required methods
fn index(&self) -> Cow<str>
Get the name of the index this document belongs to.
fn ty(&self) -> Cow<str>
Get the name of the type this document belongs to.
fn partial_id(&self) -> Option<Cow<str>>
Try get an id for this document.
fn partial_static_index() -> Option<&'static str>
Try get a statically known index this document belongs to.
fn partial_static_ty() -> Option<&'static str>
Try get a statically known type this document belongs to.
Provided methods
fn field_mapping() -> FieldDocumentMapping<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<'a, TDocument> DocumentType for &'a TDocument where
TDocument: DocumentType,
[src]
TDocument: DocumentType,
fn index(&self) -> Cow<str>
[src]
fn ty(&self) -> Cow<str>
[src]
fn partial_id(&self) -> Option<Cow<str>>
[src]
fn partial_static_index() -> Option<&'static str>
[src]
fn partial_static_ty() -> Option<&'static str>
[src]
fn field_mapping() -> FieldDocumentMapping<Self::Mapping>
[src]
fn index_mapping() -> IndexDocumentMapping<Self::Mapping>
[src]
impl<'a, TDocument> DocumentType for Cow<'a, TDocument> where
TDocument: DocumentType + Clone,
[src]
TDocument: DocumentType + Clone,