pub struct AutoNameSettings { /* private fields */ }Expand description
Controls in detail which parts of the command are automatically captured as the process name.
Process names are used in public error messages and tracing fields. Only capture
arguments, environment variables, or current directories when those values are safe to log.
Use AutoNameSettings::builder to opt into custom combinations; the builder defaults to
capturing only the program name.
Implementations§
Source§impl AutoNameSettings
impl AutoNameSettings
Sourcepub fn builder() -> AutoNameSettingsBuilder<((), (), ())>
pub fn builder() -> AutoNameSettingsBuilder<((), (), ())>
Create a builder for building AutoNameSettings.
On the builder, call .include_current_dir(...)(optional), .include_envs(...)(optional), .include_args(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of AutoNameSettings.
Source§impl AutoNameSettings
impl AutoNameSettings
Sourcepub fn program_only() -> Self
pub fn program_only() -> Self
Capture the program name.
Example: Command::new("ls").arg("-la").env("FOO", "foo) is captured as "ls".
Sourcepub fn program_with_args() -> Self
pub fn program_with_args() -> Self
Capture the program name and all arguments.
Example: Command::new("ls").arg("-la").env("FOO", "foo) is captured as ls "-la".
Arguments may contain tokens, passwords, signed URLs, or headers. Use this only when arguments are safe to include in public errors and logs or for debugging purposes.
Sourcepub fn program_with_env_and_args() -> Self
pub fn program_with_env_and_args() -> Self
Capture the program name and all environment variables and arguments.
Example: Command::new("ls").arg("-la").env("FOO", "foo) is captured as FOO=foo ls "-la".
Environment variables and arguments often contain credentials. Use this only when all captured values are safe to include in public errors and logs or for debugging purposes.
Sourcepub fn full() -> Self
pub fn full() -> Self
Capture the directory and the program name and all environment variables and arguments.
Example: Command::new("ls").arg("-la").env("FOO", "foo) is captured as
/some/dir % FOO=foo ls "-la".
Current directories, environment variables, and arguments may contain sensitive data. Use this only when all captured values are safe to include in public errors and logs.
Trait Implementations§
Source§impl Clone for AutoNameSettings
impl Clone for AutoNameSettings
Source§fn clone(&self) -> AutoNameSettings
fn clone(&self) -> AutoNameSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more