pub struct Request { /* private fields */ }Expand description
Represents an HTTP request.
§Fields
method: The HTTP method of the request (e.g., GET, POST).host: The host of the request (e.g., example.com).path: The path of the request (e.g., /api/v1/resource).query: The query string of the request (e.g., ?key=value).hash: The fragment identifier of the request (e.g., #section).headers: A collection of HTTP headers as key-value pairs.body: The binary body of the request.
Implementations§
Source§impl Request
impl Request
Sourcepub fn hash(&self) -> Cow<'static, str>
pub fn hash(&self) -> Cow<'static, str>
Retrieves the fragment identifier of the request.
§Returns
- The fragment identifier as a
Cow<'static, str>.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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