Skip to content

FromForm: Shared parameters? #2678

Discussion options

You must be logged in to vote

I think what you are looking for is called "flatten" in Serde world. Actually you can do this already with responses (e.g. for JSON) see: https://serde.rs/attr-flatten.html

Unfortunately this logic is not (yet) implemented for FromForm, at least as far as I know. There was an attempt to implement "flatten" for Forms a couple years back, but it got stuck in Draft, see: #1916

I can't really help you with the macro implementation though, I'm just trying provide some (hopefully helpful) context.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@darksylinc
Comment options

Answer selected by darksylinc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants