pub struct QlogConfig { /* private fields */ }Expand description
Configuration for qlog trace logging.
This struct is returned from QlogFactory::for_connection if qlog logging should
be enabled for a connection. It allows to set metadata for the qlog trace.
The trace will be written to the provided writer in the [JSON-SEQ format] defined in the qlog spec.
Implementations§
Source§impl QlogConfig
impl QlogConfig
Sourcepub fn new(writer: Box<dyn Write + Send + Sync>) -> Self
pub fn new(writer: Box<dyn Write + Send + Sync>) -> Self
Creates a new QlogConfig that writes a qlog trace to the specified writer.
Sourcepub fn title(&mut self, title: Option<String>) -> &mut Self
pub fn title(&mut self, title: Option<String>) -> &mut Self
Title to record in the qlog capture
Sourcepub fn description(&mut self, description: Option<String>) -> &mut Self
pub fn description(&mut self, description: Option<String>) -> &mut Self
Description to record in the qlog capture
Sourcepub fn start_time(&mut self, start_time: Instant) -> &mut Self
pub fn start_time(&mut self, start_time: Instant) -> &mut Self
Epoch qlog event times are recorded relative to
If unset, the start of the connection is used.
Auto Trait Implementations§
impl Freeze for QlogConfig
impl !RefUnwindSafe for QlogConfig
impl Send for QlogConfig
impl Sync for QlogConfig
impl Unpin for QlogConfig
impl !UnwindSafe for QlogConfig
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more