pub struct Body { /* private fields */ }Expand description
The body of a response.
Construct one from bytes or a string via the From impls. Internally a body
is either buffered bytes or a region of an open file that the engines stream
in bounded chunks rather than reading into memory — but that is an
implementation detail, so Body is an opaque struct. Cloning a file body
shares the underlying descriptor (via Arc), so Response stays cheap to
clone.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnsafeUnpin 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