pub enum Body {
Empty,
Static(&'static [u8]),
Owned(Vec<u8>),
}Expand description
A response body.
Variants§
Empty
No body.
Static(&'static [u8])
Bytes that live for the whole program: sent without copying into a fresh allocation first.
Owned(Vec<u8>)
Owned bytes.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Body
impl Freeze for Body
impl Move 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