add support for iron's Request type #13
No reviewers
Labels
No labels
P-high
P-low
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mikedilger/formdata!13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thanks for the PR.
I'm hesitant to have formdata depend on iron. I'm aware that people are starting to use it with the iron framework, but I personally use it outside of the iron framework.
The fact that Iron uses a different request structure makes it difficult to support. I'm sure there were reasons, but I'm not sure iron's chosen architecture is the right solution.
The Request trait was added to make it possible to use iron requests. However it occurs to me that an impl of that trait must be defined either where the trait is defined (in formdata) or where the struct is defined (in iron), and not in some consumer of both (unless rust language subsequently changed this restriction)
@SkylerLipthay, how are you able to
impltheformdata::Requesttrait for Iron?If it turns out that there is no better solution, then I'd prefer to wrap iron dependencies under a feature called 'iron' so that those of us not using iron don't have to wait needlessly for iron to compile.
Thanks again. This is certainly something that needs to be sorted out.
On 2nd thought, perhaps I will dispense with
Hyper::Requestand just require a&mut SwhereS: Read, and&Headersseparately...Please see the branch
no_requestand let me know if this is going to work for youHere is my usage of
Request: https://github.com/iron/params/blob/master/src/lib.rs#L562I often employe this wrapper pattern, but it's my least favorite Rust idiom. I really hope we can figure out external-external trait impls at some point!
@mikedilger
no_requestworks great for me. @SkylerLipthay thanks forparams. It is what i wanted to make.Pull request closed