pub struct RequestInfo {
pub trace_id: String,
pub method: String,
pub path: String,
pub remote_addr: String,
pub user_agent: String,
pub start_time_ms: u128,
}
Expand description
Request information for logging
Fields§
§trace_id: String
Trace ID for request correlation
method: String
HTTP method
path: String
Request path
remote_addr: String
Remote address
user_agent: String
User agent
start_time_ms: u128
Request start time (milliseconds since epoch)
Implementations§
Source§impl RequestInfo
impl RequestInfo
Sourcepub fn elapsed_ms(&self) -> u128
pub fn elapsed_ms(&self) -> u128
Calculate elapsed time in milliseconds
Trait Implementations§
Source§impl Clone for RequestInfo
impl Clone for RequestInfo
Source§fn clone(&self) -> RequestInfo
fn clone(&self) -> RequestInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RequestInfo
impl RefUnwindSafe for RequestInfo
impl Send for RequestInfo
impl Sync for RequestInfo
impl Unpin for RequestInfo
impl UnwindSafe for RequestInfo
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