Struct prima_bridge::Body
source · pub struct Body { /* private fields */ }
Expand description
A request body.
It can be an in-memory buffer, a file, or a stream.
See the various From
implementations for ways to construct a Body
.
Implementations§
source§impl Body
impl Body
sourcepub fn from_stream<S>(stream: S) -> Body
pub fn from_stream<S>(stream: S) -> Body
Construct a Body
from a streamable type.
Generally, you can just use the various From
implementations to create a Body
instead.
This is provided for cases where you don’t want to load the entire body into memory at once, and instead want to stream it from something like a file handle.
Trait Implementations§
Auto Trait Implementations§
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