[rust] Support async file upload
Adding upload support when generating async Rust code.
PR checklist
- [x] Read the contribution guidelines.
- [x] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [x] Run the following to build the project and update samples:
(For Windows users, please run the script in Git BASH) Commit all changed files. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./mvnw clean package || exit ./bin/generate-samples.sh ./bin/configs/*.yaml || exit ./bin/utils/export_docs_generators.sh || exit./bin/generate-samples.sh bin/configs/java*. IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed. - [x] File the PR against the correct branch:
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks) - [x] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
The function From.file for adding a file in multipart requests seems to require the stream feature of the reqwest crate.
Mention @farcaller to review Rust part.
thanks for the PR
cc @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10)
@farcaller @vincent-herlemont Any chance of reviving this?
@metasim did you test it locally?
can you or @vincent-herlemont submit a new PR on top of this one with resolved merge conflicts?
thanks.
@wing328 I did not test this PR.... I was more interested in the functionality being implemented, and it looked like it was more or less done, yet stalled for some reason.
looks like this is already done with an additional option useAsyncFileStream
so closing this one