pub struct RedactedTextComposer { /* private fields */ }Expand description
Builds one ordered, redacted text value through consuming chained calls.
§Examples
use qubit_redact::Redactor;
let output = Redactor::strict()
.text_composer()
.literal("password=")
.field("password", "raw-secret")
.finish();
assert!(!output.text().as_str().contains("raw-secret"));Implementations§
Source§impl RedactedTextComposer
impl RedactedTextComposer
Sourcepub fn argv<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut ArgvRedactionWriter<'session>),
pub fn argv<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut ArgvRedactionWriter<'session>),
Appends command-line text configured through the argv writer.
Sourcepub fn env<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut EnvRedactionWriter<'session>),
pub fn env<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut EnvRedactionWriter<'session>),
Appends environment text configured through the environment writer.
Sourcepub fn process<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut ProcessRedactionWriter<'session>),
pub fn process<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut ProcessRedactionWriter<'session>),
Appends process text configured through the process writer.
Sourcepub fn json<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut JsonRedactionWriter<'session>),
pub fn json<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut JsonRedactionWriter<'session>),
Appends JSON text configured through the JSON writer.
Sourcepub fn http<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut HttpRedactionWriter<'session>),
pub fn http<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut HttpRedactionWriter<'session>),
Appends HTTP text configured through the HTTP writer.
Sourcepub fn uri<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut UriRedactionWriter<'session>),
pub fn uri<F>(self, configure: F) -> Selfwhere
F: for<'session> FnOnce(&mut UriRedactionWriter<'session>),
Appends URI text configured through the URI writer.
Sourcepub fn finish(self) -> RedactionTextOutput
pub fn finish(self) -> RedactionTextOutput
Consumes the composer and publishes its redacted text and summary.
Auto Trait Implementations§
impl Freeze for RedactedTextComposer
impl RefUnwindSafe for RedactedTextComposer
impl Send for RedactedTextComposer
impl Sync for RedactedTextComposer
impl Unpin for RedactedTextComposer
impl UnsafeUnpin for RedactedTextComposer
impl UnwindSafe for RedactedTextComposer
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