pub struct PrependBuild<F> {
inner: F,
}Expand description
Wraps a JSON [FormatEvent] so the rendered object always begins with a
"build" key.
The wrapper renders the inner formatter into a temporary String, then
rewrites the leading { to {"build":"<variant>",. All other keys, span
context, and trailing newline produced by the inner formatter are
preserved verbatim, so existing CloudWatch Insights queries keep working.
Fields§
§inner: FImplementations§
Source§impl<F> PrependBuild<F>
impl<F> PrependBuild<F>
Trait Implementations§
Source§impl<S, N, F> FormatEvent<S, N> for PrependBuild<F>where
S: Subscriber + for<'a> LookupSpan<'a>,
N: for<'a> FormatFields<'a> + 'static,
F: FormatEvent<S, N>,
impl<S, N, F> FormatEvent<S, N> for PrependBuild<F>where
S: Subscriber + for<'a> LookupSpan<'a>,
N: for<'a> FormatFields<'a> + 'static,
F: FormatEvent<S, N>,
Source§fn format_event(
&self,
ctx: &FmtContext<'_, S, N>,
writer: Writer<'_>,
event: &Event<'_>,
) -> Result
fn format_event( &self, ctx: &FmtContext<'_, S, N>, writer: Writer<'_>, event: &Event<'_>, ) -> Result
Write a log message for [
Event] in [FmtContext] to the given [Writer].Auto Trait Implementations§
impl<F> Freeze for PrependBuild<F>where
F: Freeze,
impl<F> RefUnwindSafe for PrependBuild<F>where
F: RefUnwindSafe,
impl<F> Send for PrependBuild<F>where
F: Send,
impl<F> Sync for PrependBuild<F>where
F: Sync,
impl<F> Unpin for PrependBuild<F>where
F: Unpin,
impl<F> UnsafeUnpin for PrependBuild<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for PrependBuild<F>where
F: UnwindSafe,
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