pub enum ResponseBody {
Bytes(Vec<u8>),
File(FileBody),
}Expand description
The body of an HTTP response.
Variants§
Implementations§
Trait Implementations§
Source§impl Debug for ResponseBody
impl Debug for ResponseBody
Source§impl From<&str> for ResponseBody
impl From<&str> for ResponseBody
Source§fn from(text: &str) -> ResponseBody
fn from(text: &str) -> ResponseBody
Converts to this type from the input type.
Source§impl From<FileBody> for ResponseBody
impl From<FileBody> for ResponseBody
Source§fn from(file: FileBody) -> ResponseBody
fn from(file: FileBody) -> ResponseBody
Converts to this type from the input type.
Source§impl From<String> for ResponseBody
impl From<String> for ResponseBody
Source§fn from(text: String) -> ResponseBody
fn from(text: String) -> ResponseBody
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ResponseBody
impl !Sync for ResponseBody
impl !UnwindSafe for ResponseBody
impl Freeze for ResponseBody
impl Send for ResponseBody
impl Unpin for ResponseBody
impl UnsafeUnpin for ResponseBody
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