samscott89 / serde_qs

Serde support for querystring-style strings
Apache License 2.0
193 stars 68 forks source link

Incompatibility of QsQuery with actix_web Query caused by private tuple field #85

Open Adhalianna opened 1 year ago

Adhalianna commented 1 year ago

I have just attempted to replace actix's Query with QsQuery but I had some problems. Query has its field public which makes constructing it, for example within tests, possible whereas QsQuery cannot be constructed without taking in the whole request with from_request.

Adhalianna commented 1 year ago

I have quickly checked and it seems that Query has had its field public at least since actix_web version 2.0.0, version 1.0.0 has it private.

samscott89 commented 1 year ago

Hey @Adhalianna

Could you share a little more about the use case? Where would you want to access the QsQuery rather than the inner type, if not from the request object?

If possible, I would prefer to keep the inner type private, in case we want to extend it to include more fields in the future. But happy to make the change if there's no good alternative.