pub struct EnvRedactionWriter<'session> { /* private fields */ }Expand description
A borrowed environment façade over one mutable diagnostic session.
§Type Parameters
'session- Borrow of the parent composer’s unpublished transaction.
§Examples
use qubit_redact::Redactor;
let output = Redactor::standard().text_composer().env(|env| {
env.pair("PASSWORD", "raw-password");
}).finish();
assert!(!output.text().as_str().contains("raw-password"));Implementations§
Source§impl<'session> EnvRedactionWriter<'session>
impl<'session> EnvRedactionWriter<'session>
Sourcepub fn pair(&mut self, name: &str, value: &str) -> &mut Self
pub fn pair(&mut self, name: &str, value: &str) -> &mut Self
Redacts one pair into the parent session’s aggregate output.
The name selects field policy; both name and value bytes consume the parent’s input allowance before rendering the assignment.
§Parameters
name- Environment variable name used for classification.value- Borrowed value to redact or preserve under that policy.
§Returns
This writer for further operations in the same transaction.
Sourcepub fn os_pairs<'items, I>(&mut self, pairs: I) -> &mut Self
pub fn os_pairs<'items, I>(&mut self, pairs: I) -> &mut Self
Redacts an environment list into the parent session’s aggregate output.
Iterator advancement is guarded by shared structural admission. Non-Unicode pairs use the format’s bounded fallback policy.
§Type Parameters
'items- Lifetime of borrowed operating-system names and values.I- Finite source of environment pairs.
§Parameters
pairs- Name/value pairs in the desired diagnostic order.
§Returns
This writer for further operations in the same transaction.
Auto Trait Implementations§
impl<'session> !UnwindSafe for EnvRedactionWriter<'session>
impl<'session> Freeze for EnvRedactionWriter<'session>
impl<'session> RefUnwindSafe for EnvRedactionWriter<'session>
impl<'session> Send for EnvRedactionWriter<'session>
impl<'session> Sync for EnvRedactionWriter<'session>
impl<'session> Unpin for EnvRedactionWriter<'session>
impl<'session> UnsafeUnpin for EnvRedactionWriter<'session>
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