pub struct Info<'a> { /* private fields */ }
Expand description
Information about the request/response that can be used to prepare log lines.
Implementations§
Source§impl<'a> Info<'a>
impl<'a> Info<'a>
Sourcepub fn remote_addr(&self) -> Option<SocketAddr>
pub fn remote_addr(&self) -> Option<SocketAddr>
View the remote SocketAddr
of the request.
Sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
View the http::StatusCode
of the response.
Sourcepub fn user_agent(&self) -> Option<&str>
pub fn user_agent(&self) -> Option<&str>
View the user agent of the request.
Sourcepub fn request_headers(&self) -> &HeaderMap
pub fn request_headers(&self) -> &HeaderMap
Access the full headers of the request
Auto Trait Implementations§
impl<'a> Freeze for Info<'a>
impl<'a> !RefUnwindSafe for Info<'a>
impl<'a> Send for Info<'a>
impl<'a> Sync for Info<'a>
impl<'a> Unpin for Info<'a>
impl<'a> !UnwindSafe for Info<'a>
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