pub enum AutoName {
Using(AutoNameSettings),
Debug,
}Expand description
Controls how the process name is automatically generated when not explicitly provided.
This determines what information is included in the auto-generated process name used in public errors, logs, and debugging output. The default captures only the program name so command arguments and environment variables are not logged accidentally.
Variants§
Using(AutoNameSettings)
Capture a name from the command as specified by the provided settings.
Example: ls "-la" from Command::new("ls").arg("-la") when using
AutoName::program_with_args.
Debug
Capture the full Debug representation of the Command.
Example: "Command { std: \"ls\" \"-la\", kill_on_drop: false }"
Note: This includes internal implementation details and may change with tokio updates. It may also include command arguments, environment variables, or other sensitive data.
Implementations§
Source§impl AutoName
impl AutoName
Sourcepub fn program_only() -> Self
pub fn program_only() -> Self
Capture only the program name.
This is the safe default and excludes command arguments and environment variables.
Sourcepub fn program_with_args() -> Self
pub fn program_with_args() -> Self
Capture the program name and all arguments.
Arguments may contain sensitive data. Use this only when arguments are safe to log.
Sourcepub fn program_with_env_and_args() -> Self
pub fn program_with_env_and_args() -> Self
Capture the program name together with all environment variables and arguments.
Environment variables and arguments often contain credentials. Use this only when all captured values are safe to log.