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

Add #[debug_middleware] #1993

Closed
wants to merge 11 commits into from
Closed

Add #[debug_middleware] #1993

wants to merge 11 commits into from

Conversation

davidpdrsn
Copy link
Member

@davidpdrsn davidpdrsn commented May 7, 2023

Fixes #1985

TODO

  • Docs
  • Tests
  • Changelog

@davidpdrsn davidpdrsn marked this pull request as ready for review May 7, 2023 20:47
Comment on lines +97 to +102
fn name(&self) -> &'static str {
match self {
FunctionKind::Handler => "handler",
FunctionKind::Middleware => "middleware",
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not a Display impl?

Comment on lines +37 to +38
`#[debug_{}(state = MyStateType)]`",
kind.name()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

… previous suggestion would allow this:

Suggested change
`#[debug_{}(state = MyStateType)]`",
kind.name()
`#[debug_{kind}(state = MyStateType)]`",

@nipunn1313
Copy link

nice!

@Vrajs16
Copy link

Vrajs16 commented Jan 30, 2024

When will this be merged?

@davidpdrsn
Copy link
Member Author

When will this be merged?

When I take the time to address the comments and clean it up. Don't know when that'll be.

@VictorElHajj
Copy link

Due to the arcane trait bound errors middlewares are basically useless unless this is merged.

@yanns yanns mentioned this pull request May 2, 2024
@yanns
Copy link
Contributor

yanns commented May 2, 2024

I'm continuing the work in #2725
Feedback, review, help welcome

@jplatte
Copy link
Member

jplatte commented May 2, 2024

Superseded by the PR linked above.

@jplatte jplatte closed this May 2, 2024
@jplatte jplatte deleted the david/debug-middleware branch May 25, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#[debug_handler] for from_fn middleware
6 participants