We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's a bit weird that deriving ElasticType implements a trait called DocumentType (it might also add a mapping type and derive traits for that).
ElasticType
DocumentType
This should be aligned with the trait bound you'd use to accept a document type.
The options are:
#[derive(ElasticType)] struct MyData { id: i32, title: String } fn with_doc<TDocument: ElasticType>(doc: TDocument) { }
#[derive(DocumentType)] struct MyData { id: i32, title: String } fn with_doc<TDocument: DocumentType>(doc: TDocument) { }
ElasticDocument
#[derive(ElasticDocument)] struct MyData { id: i32, title: String } fn with_doc<TDocument: ElasticDocument>(doc: TDocument) { }
I don't have a strong leaning yet. I'll play with it in some actual code and see which one works out best.
The text was updated successfully, but these errors were encountered:
The same goes for deriving ElasticDateFormat.
ElasticDateFormat
I'll do an experiment and see what happens if you have conflicting derives.
Sorry, something went wrong.
No branches or pull requests
It's a bit weird that deriving
ElasticType
implements a trait calledDocumentType
(it might also add a mapping type and derive traits for that).This should be aligned with the trait bound you'd use to accept a document type.
The options are:
Rename
DocumentType
toElasticType
:Rename
ElasticType
toDocumentType
:Rename both to
ElasticDocument
:I don't have a strong leaning yet. I'll play with it in some actual code and see which one works out best.
The text was updated successfully, but these errors were encountered: