Skip to content
New issue

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

[WIP] Let users customize their web client #457

Closed
wants to merge 1 commit into from

Conversation

shimatar0
Copy link
Contributor

Pull Request

Related issue

Fixes #452

What does this PR do?

  • This is a WIP state and I'll add it next time.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Signed-off-by: shimatar0 <shimataro0579@gmail.com>
@shimatar0 shimatar0 marked this pull request as draft March 31, 2023 07:36
@shimatar0
Copy link
Contributor Author

shimatar0 commented Mar 31, 2023

I'll discuss it with @irevoire !

・I want to be able to have a request method in the Client structure to satisfy this issue.
・But request::request is an asycn function, and the signature is very difficult to define

example of an error message

error[E0308]: mismatched types
  --> src/client.rs:54:29
   |
54 |             request_method: request,
   |                             ^^^^^^^ expected struct `Box`, found opaque type
   |
   = note: expected fn pointer `for<'a, 'b> fn(&'a str, &'b str, request::Method<Value, Value>, _) -> Box<(dyn futures::Future<Output = Result<Value, errors::Error>> + std::marker::Send + 'static)>`
                 found fn item `for<'a, 'b> fn(&'a str, &'b str, request::Method<_, _>, _) -> impl futures::Future<Output = Result<_, errors::Error>> {request::request::<_, _, _>}`

@shimatar0
Copy link
Contributor Author

sorry. I've synced with github(remote) and now I can't get Rebase and push to work, so let me close this PR once.
The new PR will be as follows.
#459

@shimatar0 shimatar0 closed this Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let users customize their web client
1 participant