pub struct RequestHeaders<'b, const N: usize> {
pub http11: bool,
pub method: Method,
pub path: &'b str,
pub headers: Headers<'b, N>,
}
Expand description
Request headers including the request line (method, path)
Fields§
§http11: bool
Whether the request is HTTP/1.1
method: Method
The HTTP method
path: &'b str
The request path
headers: Headers<'b, N>
The headers
Implementations§
Source§impl<'b, const N: usize> RequestHeaders<'b, N>
impl<'b, const N: usize> RequestHeaders<'b, N>
Sourcepub async fn receive<R>(
&mut self,
buf: &'b mut [u8],
input: R,
exact: bool,
) -> Result<(&'b mut [u8], usize), Error<R::Error>>where
R: Read,
pub async fn receive<R>(
&mut self,
buf: &'b mut [u8],
input: R,
exact: bool,
) -> Result<(&'b mut [u8], usize), Error<R::Error>>where
R: Read,
Parse the headers from the input stream
Source§impl<const N: usize> RequestHeaders<'_, N>
impl<const N: usize> RequestHeaders<'_, N>
pub const fn new() -> Self
Sourcepub fn is_ws_upgrade_request(&self) -> bool
pub fn is_ws_upgrade_request(&self) -> bool
A utility method to check if the request is a Websocket upgrade request
Trait Implementations§
Source§impl<'b, const N: usize> Debug for RequestHeaders<'b, N>
impl<'b, const N: usize> Debug for RequestHeaders<'b, N>
Source§impl<const N: usize> Default for RequestHeaders<'_, N>
impl<const N: usize> Default for RequestHeaders<'_, N>
Auto Trait Implementations§
impl<'b, const N: usize> Freeze for RequestHeaders<'b, N>
impl<'b, const N: usize> RefUnwindSafe for RequestHeaders<'b, N>
impl<'b, const N: usize> Send for RequestHeaders<'b, N>
impl<'b, const N: usize> Sync for RequestHeaders<'b, N>
impl<'b, const N: usize> Unpin for RequestHeaders<'b, N>
impl<'b, const N: usize> UnwindSafe for RequestHeaders<'b, N>
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