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

Async borrowing (continuation of #449) #450

Merged
merged 15 commits into from
Sep 5, 2020

Commits on Aug 28, 2020

  1. WIP: "closure implements Fn, so references to captured variables ca…

    …n't escape the closure"
    alsuren authored and tanriol committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    94fa599 View commit details
    Browse the repository at this point in the history
  2. to_async_borrowing: pass state by a mutable ref

    This change is important for two reasons. First, it allows the async
    handler to take the body (or other data) from State. Second, a mutable
    reference, unlike a shared one, can be Send without State being Sync
    (which it is not).
    tanriol committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    8bb7dac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a36cd23 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7dafd8f View commit details
    Browse the repository at this point in the history
  5. AsyncHandlerFn: drop unneeded bounds

    These are required on the handler factory (NewHandler impl), but not on
    the handler itself.
    tanriol committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    dc6e030 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    335cde5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4a696fe View commit details
    Browse the repository at this point in the history
  8. to_async_borrowing: make return type generic

    The success path can return not only a response but also anything that
    implements IntoResponse.
    tanriol committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    6657ecd View commit details
    Browse the repository at this point in the history
  9. to_async_borrowing: move out impl from definition

    Split the impl into the new handler marker trait
    and the actual impl using it.
    tanriol committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    ea29f92 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    25af37c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5f6e044 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ac424d9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    73f4ed1 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2020

  1. Configuration menu
    Copy the full SHA
    9a08d71 View commit details
    Browse the repository at this point in the history
  2. examples: have both to_async and to_async_borrowing

    This partially reverts 5f6e044 and 73f4ed1.
    tanriol committed Sep 5, 2020
    Configuration menu
    Copy the full SHA
    f853599 View commit details
    Browse the repository at this point in the history