#[non_exhaustive]pub struct Head {
pub method: Method,
pub uri: Uri,
pub version: Version,
pub headers: HeaderMap<HeaderValue>,
pub extensions: Extensions,
pub body_limit: BodyLimit,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.method: MethodThe request’s method
uri: UriThe request’s URI
version: VersionThe request’s version
headers: HeaderMap<HeaderValue>The request’s headers
extensions: ExtensionsThe request’s extensions
body_limit: BodyLimitImplementations§
Source§impl Head
impl Head
pub fn content_type(&self) -> Option<&str>
pub fn content_length(&self) -> Option<usize>
pub fn local_addr(&self) -> LocalAddr
pub fn remote_addr(&self) -> RemoteAddr
pub fn original_uri(&self) -> &OriginalUri
Trait Implementations§
Source§impl ApiRequestHead for Head
impl ApiRequestHead for Head
Source§impl<'a> FromRequestHead<'a> for Head
impl<'a> FromRequestHead<'a> for Head
type Error = Infallible
async fn from_request_head(head: &'a mut Head) -> Result<Self, Self::Error>
Auto Trait Implementations§
impl !Freeze for Head
impl !RefUnwindSafe for Head
impl Send for Head
impl Sync for Head
impl Unpin for Head
impl !UnwindSafe for Head
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