pub struct Body {
pub body: Vec<u8>,
}
Expand description
The Body associated with an HTTP Request or Response.
§Examples
use dbs_uhttp::Body;
let body = Body::new("This is a test body.".to_string());
assert_eq!(body.raw(), b"This is a test body.");
assert_eq!(body.len(), 20);
Fields§
§body: Vec<u8>
Body of the HTTP message as bytes.
Implementations§
Trait Implementations§
impl Eq for Body
impl StructuralPartialEq for Body
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