Skip to content

Make Request and RequestBuilder implement IntoFuture #500

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ultrabear
Copy link

This PR adds IntoFuture implementations (and Future implementing types RequestFuture and RequestBuilderFuture) for Request and RequestBuilder

This makes it possible to have smoother usage of the API, with patterns like Request::get("/foo").await now being possible (previously Request::get("/foo").send().await.

This is my first time handwriting Future's, so they are simple enum based state machines and or just wrap inner futures, I see no reasons they would be noticeably less performant than the previous implementation however.

I realize as I write that it may have been a better idea to make RequestFuture and RequestBuilderFuture public in an unreachable module (not reference-able by userspace or documented publicly), if that change is wanted or to simply make them doc(hidden), or to just leave it be and give them a sentence of docs explaining what they are, I'm willing to do any of the three in a followup commit within this PR

@ultrabear
Copy link
Author

Some CI tests are failing because they try to grab wasm32-wasi, which has been removed. the target was renamed to wasm32-wasip1.

@ultrabear
Copy link
Author

I do not know why the gloo-worker CI tests failed based on my PR, changes were only made in gloo-net and there does not appear to be a dependency chain where gloo-worker imports gloo-net

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.

1 participant