pub struct Request<'b, 'h> {
pub method: &'b [u8],
pub target: &'b [u8],
pub form: TargetForm,
pub version: Version,
pub headers: &'h [Header<'b>],
pub framing: Framing,
pub keep_alive: bool,
pub expect_continue: bool,
pub upgrade: Option<&'b [u8]>,
pub host: Option<&'b [u8]>,
pub head_len: usize,
}Expand description
A parsed request head. Everything borrows from the receive buffer ('b) and the header
storage ('h).
Fields§
§method: &'b [u8]The method token.
target: &'b [u8]The request target, as sent.
form: TargetFormThe target’s form.
version: VersionThe version.
headers: &'h [Header<'b>]All header fields in order.
framing: FramingHow the body is delimited.
keep_alive: boolWhether the connection may be reused after this exchange (version and Connection).
expect_continue: boolExpect: 100-continue on an HTTP/1.1 request (RFC 9110 §10.1.1).
upgrade: Option<&'b [u8]>The Upgrade value when Connection names upgrade (HTTP/1.1 only).
host: Option<&'b [u8]>The Host value.
head_len: usizeBytes taken by the head, including leading empty lines and the final CRLF.
Implementations§
Trait Implementations§
impl<'b, 'h> Copy for Request<'b, 'h>
impl<'b, 'h> Eq for Request<'b, 'h>
impl<'b, 'h> StructuralPartialEq for Request<'b, 'h>
Auto Trait Implementations§
impl<'b, 'h> Forget for Request<'b, 'h>
impl<'b, 'h> Freeze for Request<'b, 'h>
impl<'b, 'h> Move for Request<'b, 'h>
impl<'b, 'h> RefUnwindSafe for Request<'b, 'h>
impl<'b, 'h> Send for Request<'b, 'h>
impl<'b, 'h> Sync for Request<'b, 'h>
impl<'b, 'h> Unpin for Request<'b, 'h>
impl<'b, 'h> UnsafeUnpin for Request<'b, 'h>
impl<'b, 'h> UnwindSafe for Request<'b, 'h>
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