pub enum Body {
Empty,
Body(Box<[u8]>),
Stream(ReadableStream),
}Expand description
A wrapper for worker::ResponseBody.
The Body variant differs from ResponseBody body variant, this stores a Box<[u8]> instead of a Vec<u8>.
Variants§
Trait Implementations§
Source§impl From<&ResponseBody> for Body
impl From<&ResponseBody> for Body
Source§fn from(b: &ResponseBody) -> Self
fn from(b: &ResponseBody) -> Self
Converts to this type from the input type.
Source§impl From<Body> for ResponseBody
impl From<Body> for ResponseBody
Source§impl From<ResponseBody> for Body
impl From<ResponseBody> for Body
Source§fn from(b: ResponseBody) -> Self
fn from(b: ResponseBody) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Body
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