Struct sozu_command_lib::logging::access_logs::RequestRecord
source · pub struct RequestRecord<'a> {Show 19 fields
pub message: Option<&'a str>,
pub context: LogContext<'a>,
pub session_address: Option<SocketAddr>,
pub backend_address: Option<SocketAddr>,
pub protocol: &'a str,
pub endpoint: EndpointRecord<'a>,
pub tags: Option<&'a CachedTags>,
pub client_rtt: Option<Duration>,
pub server_rtt: Option<Duration>,
pub user_agent: Option<&'a str>,
pub service_time: Duration,
pub response_time: Duration,
pub bytes_in: usize,
pub bytes_out: usize,
pub pid: i32,
pub tag: &'a str,
pub level: LogLevel,
pub now: Rfc3339Time,
pub precise_time: i128,
}
Expand description
Intermediate representation of an access log agnostic of the final format. Every field is a reference to avoid capturing ownership (as a logger should).
Fields§
§message: Option<&'a str>
§context: LogContext<'a>
§session_address: Option<SocketAddr>
§backend_address: Option<SocketAddr>
§protocol: &'a str
§endpoint: EndpointRecord<'a>
§client_rtt: Option<Duration>
§server_rtt: Option<Duration>
§user_agent: Option<&'a str>
§service_time: Duration
§response_time: Duration
§bytes_in: usize
§bytes_out: usize
§pid: i32
§tag: &'a str
§level: LogLevel
§now: Rfc3339Time
§precise_time: i128
Implementations§
source§impl RequestRecord<'_>
impl RequestRecord<'_>
sourcepub fn into_binary_access_log(self) -> ManuallyDrop<ProtobufAccessLog>
pub fn into_binary_access_log(self) -> ManuallyDrop<ProtobufAccessLog>
Converts the RequestRecord in its protobuf representation. Prost needs ownership over all the fields but we don’t want to take it from the user or clone them, so we use the unsafe DuplicateOwnership.
Auto Trait Implementations§
impl<'a> Freeze for RequestRecord<'a>
impl<'a> RefUnwindSafe for RequestRecord<'a>
impl<'a> Send for RequestRecord<'a>
impl<'a> Sync for RequestRecord<'a>
impl<'a> Unpin for RequestRecord<'a>
impl<'a> UnwindSafe for RequestRecord<'a>
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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