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>§tags: Option<&'a CachedTags>§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<'_>

source

pub fn full_tags(&self) -> FullTags<'_>

source

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<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V