pub struct ArgvRedactionWriter<'session> { /* private fields */ }Expand description
A borrowed argv façade over one mutable diagnostic session.
§Type Parameters
'session- Borrow of the parent composer’s unpublished transaction.
§Examples
use std::ffi::OsStr;
use qubit_redact::{Redactor, Sensitivity};
use qubit_redact::formats::argv::ArgvItem;
let output = Redactor::standard().text_composer().argv(|argv| {
argv.items([ArgvItem::sensitive(OsStr::new("raw-token"), Sensitivity::Secret)]);
}).finish();
assert!(!output.text().as_str().contains("raw-token"));Implementations§
Source§impl<'session> ArgvRedactionWriter<'session>
impl<'session> ArgvRedactionWriter<'session>
Sourcepub fn items<'items, I>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = ArgvItem<'items>>,
pub fn items<'items, I>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = ArgvItem<'items>>,
Redacts items into the parent session’s aggregate output.
Plain items retain their values; use Self::heuristic_items to infer
sensitivity from supported option syntax. Iterator advancement stops
when shared structural admission fails or output is already closed.
§Type Parameters
'items- Lifetime of borrowed argument values.I- Finite source of explicitly classified argument items.
§Parameters
items- Arguments in their original command-line order.
§Returns
This writer for further operations in the same transaction.
Sourcepub fn heuristic_items<'items, I>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = ArgvItem<'items>>,
pub fn heuristic_items<'items, I>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = ArgvItem<'items>>,
Redacts heuristic items into the parent session’s aggregate output.
Supported option syntax is interpreted only for plain items; explicit sensitivity is authoritative. This operation does not parse shell code.
§Type Parameters
'items- Lifetime of borrowed argument values.I- Finite source of arguments to classify and render.
§Parameters
items- Arguments in their original command-line order.
§Returns
This writer for further operations in the same transaction.
Auto Trait Implementations§
impl<'session> !UnwindSafe for ArgvRedactionWriter<'session>
impl<'session> Freeze for ArgvRedactionWriter<'session>
impl<'session> RefUnwindSafe for ArgvRedactionWriter<'session>
impl<'session> Send for ArgvRedactionWriter<'session>
impl<'session> Sync for ArgvRedactionWriter<'session>
impl<'session> Unpin for ArgvRedactionWriter<'session>
impl<'session> UnsafeUnpin for ArgvRedactionWriter<'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