Feat trait to make clients customizable
Pull Request
Related issue
Fixes #452
What does this PR do?
- This is a WIP state and I'll add it next time.
- There are still many problems to be solved. I will comment on the code.
PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?
Thank you so much for contributing to Meilisearch!
Sorry. It's not in working condition at all yet. It may be a more difficult task than think. It is very likely that this PR will only share the situation and not finalize the merge.
This sounds like a lot to think about!
Return value needed to be changed to meet async trait.
So it looks like we need to match the parse_response.
error[E0277]: the trait bound `dyn futures::Future<Output = Result<Box<dyn std::marker::Send>, errors::Error>> + std::marker::Send: Deserialize<'_>` is not satisfied
--> src/request.rs:123:9
|
123 | parse_response(status, expected_status_code, body)
| ^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `dyn futures::Future<Output = Result<Box<dyn std::marker::Send>, errors::Error>> + std::marker::Send`
What is the status of this?
I'm looking into using Meilisearch, but having to bundle an entire copy of curl into my binary just because of this issue is giving me hesitation. I use hyper/reqwest extensively within my server already.
The pr is mainly finished. It should go over a last round of review, but with the MeiliSearch release coming out this Monday, we didn't find the time to merge it. I hope we’ll be able to merge it next week
Is there anything I can do to get this PR past the finishing line? I'm open to rebasing this with master and squashing relevant commits if it helps with reviewability.