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 a builder for router::Request #3267

Closed
Geal opened this issue Jun 16, 2023 · 0 comments · Fixed by #3430
Closed

Add a builder for router::Request #3267

Geal opened this issue Jun 16, 2023 · 0 comments · Fixed by #3430
Assignees

Comments

@Geal
Copy link
Contributor

Geal commented Jun 16, 2023

The struct is marked as non-exhaustive, so if a router plugin tries to destructure it and reconstruct it, it cannot because the struct syntax is not available for non exhaustive types:

#[non_exhaustive]
pub struct Request {
/// Original request to the Router.
pub router_request: http::Request<Body>,
/// Context for extension
pub context: Context,
}

@Geal Geal mentioned this issue Jul 13, 2023
6 tasks
@Geal Geal self-assigned this Jul 13, 2023
Geal added a commit that referenced this issue Oct 19, 2023
Fix #3267 

The builder implementation was missing on the router request side, which
means that router service level plugins cannot reuse the context if they
unpack the request object
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 a pull request may close this issue.

1 participant