hyperium / http-body

Asynchronous HTTP body trait
MIT License
125 stars 49 forks source link

feat(util): add `BodyExt::limited` #123

Open vvvviiv opened 2 months ago

vvvviiv commented 2 months ago

According to https://github.com/hyperium/hyper/issues/3111#issuecomment-1379585720 and https://github.com/hyperium/hyper/issues/3111#issuecomment-1901058988, it seems that the BodyExt trait is supposed to have a limit() method.

I couldn't find it, so I opened this PR. I also slightly changed its name to limited to maintain consistency with methods like boxed.