Skip to main content

ProcessRedactionWriter

Struct ProcessRedactionWriter 

Source
pub struct ProcessRedactionWriter<'session> { /* private fields */ }
Expand description

A borrowed process-command facade over one active redaction transaction.

This type owns no redactor, policy, result, or budget. Each operation delegates directly to the argv or environment namespace of the parent session, so process diagnostics participate in the same atomic output.

Implementations§

Source§

impl<'session> ProcessRedactionWriter<'session>

Source

pub fn command<'arguments, 'variables, A, E>( &mut self, program: &'arguments OsStr, arguments: A, variables: E, ) -> &mut Self
where A: IntoIterator<Item = ArgvItem<'arguments>>, E: IntoIterator<Item = (&'variables OsStr, &'variables OsStr)>,

Redacts a complete process command into the parent aggregate output.

program is inserted as the first argv item. arguments therefore must contain only the arguments following the executable. Each argument preserves caller-supplied ArgvItem sensitivity. variables uses borrowed operating-system name/value pairs and is rendered after argv. No key or independently published result is created.

§Type Parameters
  • 'arguments - Lifetime of borrowed argument values.
  • A - Finite argument source.
  • 'variables - Lifetime of borrowed environment names and values.
  • E - Finite environment source.
§Parameters
  • program - Executable path or program name.
  • arguments - Arguments after program.
  • variables - Environment-variable pairs associated with the command.
§Returns

This facade for further aggregate process operations.

Source

pub fn arguments<'arguments, A>(&mut self, arguments: A) -> &mut Self
where A: IntoIterator<Item = ArgvItem<'arguments>>,

Redacts command-line arguments into the parent aggregate output.

Plain arguments use the argv namespace’s documented heuristic rules; explicitly sensitive ArgvItem values are masked at their supplied sensitivity. No key or standalone output is created.

§Type Parameters
  • 'arguments - Lifetime of borrowed argument values.
  • A - Finite argument source.
§Parameters
  • arguments - Borrowed argv items to render.
§Returns

This facade for further aggregate process operations.

Source

pub fn variables<'variables, E>(&mut self, variables: E) -> &mut Self
where E: IntoIterator<Item = (&'variables OsStr, &'variables OsStr)>,

Redacts process environment variables into the parent aggregate output.

Names and values remain borrowed until the environment namespace has processed them. No key or standalone output is created.

§Type Parameters
  • 'variables - Lifetime of borrowed environment names and values.
  • E - Finite environment source.
§Parameters
  • variables - Borrowed operating-system environment name/value pairs.
§Returns

This facade for further aggregate process operations.

Auto Trait Implementations§

§

impl<'session> !UnwindSafe for ProcessRedactionWriter<'session>

§

impl<'session> Freeze for ProcessRedactionWriter<'session>

§

impl<'session> RefUnwindSafe for ProcessRedactionWriter<'session>

§

impl<'session> Send for ProcessRedactionWriter<'session>

§

impl<'session> Sync for ProcessRedactionWriter<'session>

§

impl<'session> Unpin for ProcessRedactionWriter<'session>

§

impl<'session> UnsafeUnpin for ProcessRedactionWriter<'session>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.