pub struct hyper_body(/* private fields */);
Available on crate feature
ffi
and hyper_unstable_ffi
only.Expand description
A streaming HTTP body.
This is used both for sending requests (with hyper_request_set_body
) and
for receiving responses (with hyper_response_body
).
For outgoing request bodies, call hyper_body_set_data_func
to provide the
data.
For incoming response bodies, call hyper_body_data
to get a task that will
yield a chunk of data each time it is polled. That task must be then be
added to the executor with hyper_executor_push
.
Methods:
- hyper_body_new: Create a new “empty” body.
- hyper_body_set_userdata: Set userdata on this body, which will be passed to callback functions.
- hyper_body_set_data_func: Set the data callback for this body.
- hyper_body_data: Creates a task that will poll a response body for the next buffer of data.
- hyper_body_foreach: Creates a task to execute the callback with each body chunk received.
- hyper_body_free: Free a body.
Auto Trait Implementations§
impl Freeze for hyper_body
impl !RefUnwindSafe for hyper_body
impl Send for hyper_body
impl Sync for hyper_body
impl Unpin for hyper_body
impl !UnwindSafe for hyper_body
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more