pub enum RequestBody {
None,
Binary(Vec<u8>),
Text(String),
}Expand description
§Body Content
§In HTTP messages, the content describes the ‘information’ conveyed in the message body (which follows the header section), after any message framing from HTTP/1.1 chunked transfer encoding has been removed. This was referred to as a “payload” in HTTP/1.1, but message “content” distinguishes from frame payloads in HTTP/2 and HTTP/3 where the data in a single frame could be header data, body data, or other control information.
Variants§
None
No body is present in the request.
Binary(Vec<u8>)
Body is a binary representation of data.
Text(String)
Body is a UTF-8 encoded text.
Implementations§
Source§impl RequestBody
impl RequestBody
Trait Implementations§
Source§impl Clone for RequestBody
impl Clone for RequestBody
Source§fn clone(&self) -> RequestBody
fn clone(&self) -> RequestBody
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestBody
impl Debug for RequestBody
Source§impl Default for RequestBody
impl Default for RequestBody
Source§fn default() -> RequestBody
fn default() -> RequestBody
Returns the “default value” for a type. Read more
Source§impl PartialEq for RequestBody
impl PartialEq for RequestBody
impl Eq for RequestBody
impl StructuralPartialEq for RequestBody
Auto Trait Implementations§
impl Freeze for RequestBody
impl RefUnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl Unpin for RequestBody
impl UnsafeUnpin for RequestBody
impl UnwindSafe for RequestBody
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