pub enum HttpBody {
Empty,
Bytes(Bytes),
Stream(BodyStream),
}Expand description
Request body encoding for the transport layer.
Variants§
Empty
No body.
Bytes(Bytes)
Raw bytes body.
Stream(BodyStream)
Streaming request body (not replayable for automatic retry).
Trait Implementations§
Source§impl Clone for HttpBody
impl Clone for HttpBody
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
Clones empty and byte bodies. Streaming bodies cannot be cloned and become HttpBody::Empty;
use move semantics or HttpRequest without cloning when the body is a stream.
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for HttpBody
impl !RefUnwindSafe for HttpBody
impl Send for HttpBody
impl Sync for HttpBody
impl Unpin for HttpBody
impl UnsafeUnpin for HttpBody
impl !UnwindSafe for HttpBody
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