pub enum Body {
Bytes(Bytes),
SeekableStream(Box<dyn SeekableStream>),
}Expand description
An HTTP Body.
Variants§
Bytes(Bytes)
A body of a known size.
SeekableStream(Box<dyn SeekableStream>)
Available on non-WebAssembly only.
A streaming body.
This is not currently supported on WASM targets.
Implementations§
Trait Implementations§
Source§impl<T, F> From<Body> for RequestContent<T, F>
impl<T, F> From<Body> for RequestContent<T, F>
Source§fn from(body: Body) -> RequestContent<T, F>
fn from(body: Body) -> RequestContent<T, F>
Converts to this type from the input type.
Source§impl<T, F> From<RequestContent<T, F>> for Body
impl<T, F> From<RequestContent<T, F>> for Body
Source§fn from(content: RequestContent<T, F>) -> Body
fn from(content: RequestContent<T, F>) -> Body
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for Body
impl !RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl !UnwindSafe for 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