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

Remove Body's Once variant #2922

Closed
Tracked by #2345
seanmonstar opened this issue Jul 26, 2022 · 3 comments · Fixed by #2958
Closed
Tracked by #2345

Remove Body's Once variant #2922

seanmonstar opened this issue Jul 26, 2022 · 3 comments · Fixed by #2958
Labels
A-body Area: body streaming. C-feature Category: feature. This is adding a new feature. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Milestone

Comments

@seanmonstar
Copy link
Member

No description provided.

@seanmonstar
Copy link
Member Author

It was noted that the FFI body type makes use of Body::empty(). I think there's 2 ways we can fix that:

  1. Add a pub(crate) fn ffi() -> Body that just starts the type like this:
    self.kind = Kind::Ffi(crate::ffi::UserBody::new());
  2. Or, keep an Empty variant. I don't think I like this option as much, but welcome feedback.

@seanmonstar
Copy link
Member Author

cc @Xuanwo

@seanmonstar seanmonstar added C-feature Category: feature. This is adding a new feature. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. A-body Area: body streaming. labels Jul 26, 2022
@seanmonstar seanmonstar added this to the 1.0 milestone Jul 26, 2022
@Xuanwo
Copy link
Contributor

Xuanwo commented Jul 26, 2022

  1. Add a pub(crate) fn ffi() -> Body that just starts the type like this

Let me give this a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-body Area: body streaming. C-feature Category: feature. This is adding a new feature. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Projects
No open projects
Status: Done
2 participants