pub struct Info<'a> {
route: &'a Route,
start: Instant,
status: StatusCode,
}
Expand description
Information about the request/response that can be used to prepare log lines.
Fields§
§route: &'a Route
§start: Instant
§status: StatusCode
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