pub struct MaskingMakeWriter<W> { /* private fields */ }Expand description
A MakeWriter wrapper that masks sensitive data in log output.
Wraps an inner writer
and applies masking via the supplied Masker to every log line before it reaches the underlying output.
§Examples
ⓘ
use rskit_logging::masking::{DefaultMasker, MaskingMakeWriter, Masker};
use std::sync::Arc;
let masker: Arc<dyn Masker> = Arc::new(DefaultMasker::default());
let writer = MaskingMakeWriter::new(std::io::stdout, masker);Implementations§
Source§impl<W> MaskingMakeWriter<W>
impl<W> MaskingMakeWriter<W>
Trait Implementations§
Source§impl<'a, W: MakeWriter<'a>> MakeWriter<'a> for MaskingMakeWriter<W>
impl<'a, W: MakeWriter<'a>> MakeWriter<'a> for MaskingMakeWriter<W>
Source§type Writer = MaskingWriter<<W as MakeWriter<'a>>::Writer>
type Writer = MaskingWriter<<W as MakeWriter<'a>>::Writer>
The concrete
io::Write implementation returned by make_writer.Auto Trait Implementations§
impl<W> !RefUnwindSafe for MaskingMakeWriter<W>
impl<W> !UnwindSafe for MaskingMakeWriter<W>
impl<W> Freeze for MaskingMakeWriter<W>where
W: Freeze,
impl<W> Send for MaskingMakeWriter<W>where
W: Send,
impl<W> Sync for MaskingMakeWriter<W>where
W: Sync,
impl<W> Unpin for MaskingMakeWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for MaskingMakeWriter<W>where
W: UnsafeUnpin,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
impl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
Source§fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
Wraps
self and returns a MakeWriter that will only write output
for events at or below the provided verbosity Level. For instance,
Level::TRACE is considered to be _more verbosethanLevel::INFO`. Read moreSource§fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
Wraps
self and returns a MakeWriter that will only write output
for events at or above the provided verbosity Level. Read moreSource§fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
Wraps
self with a predicate that takes a span or event’s Metadata
and returns a bool. The returned MakeWriter’s
MakeWriter::make_writer_for method will check the predicate to
determine if a writer should be produced for a given span or event. Read moreSource§fn and<B>(self, other: B) -> Tee<Self, B>where
Self: Sized,
B: MakeWriter<'a>,
fn and<B>(self, other: B) -> Tee<Self, B>where
Self: Sized,
B: MakeWriter<'a>,
Combines
self with another type implementing MakeWriter, returning
a new MakeWriter that produces writers that write to both
outputs. Read moreSource§fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
Combines
self with another type implementing MakeWriter, returning
a new MakeWriter that calls other’s make_writer if self’s
make_writer returns OptionalWriter::none. Read more