#[non_exhaustive]pub enum HttpBody {
Empty,
Bytes(Vec<u8>),
File {
file: File,
len: u64,
},
Upgrade(Box<dyn HttpUpgradeRaw>),
}Expand description
Body of the response
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
No data, does not have Content-Length
Bytes(Vec<u8>)
In-memory bytes
File
File handle to read
Upgrade(Box<dyn HttpUpgradeRaw>)
Protocol upgrade
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HttpBody
impl !RefUnwindSafe for HttpBody
impl Send for HttpBody
impl !Sync for HttpBody
impl Unpin 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