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

util: add Wrap #676

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

util: add Wrap #676

wants to merge 6 commits into from

Commits on Jul 2, 2022

  1. util: add Wrap

    This is middleware that wraps a service with both pre and post
    functions. It offers two flavors, one which is purely for passing shared
    state from the pre function to the post, and the other of which allows
    for asynchronous pre/post functions, mapping the request type, and
    short-circuiting so the inner service isn't called.
    lilyball committed Jul 2, 2022
    Configuration menu
    Copy the full SHA
    eaea5af View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2022

  1. util: Fix variance on Pre/Post

    Also tweak nested type signatures on `Pre`/`Post` to use type parameters
    instead of associated types to simplify the rustdoc output.
    lilyball committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    7b0d049 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fbe69a1 View commit details
    Browse the repository at this point in the history
  3. util: Allow ServiceExt::wrap to mutate the response value

    The `ServiceExt::wrap` combinator was supposed to let the post function
    return a different result type than the inner service, but this wasn't
    properly expressed in the type system.
    lilyball committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    3ad31c1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    80f2307 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Configuration menu
    Copy the full SHA
    d141ec4 View commit details
    Browse the repository at this point in the history