#[non_exhaustive]pub struct Process {
pub name: String,
pub binary: Option<File>,
pub libraries: Vec<File>,
pub script: Option<File>,
pub args: Vec<String>,
pub arguments_truncated: bool,
pub env_variables: Vec<EnvironmentVariable>,
pub env_variables_truncated: bool,
pub pid: i64,
pub parent_pid: i64,
pub user_id: i64,
/* private fields */
}Expand description
Represents an operating system process.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe process name, as displayed in utilities like top and ps. This name
can be accessed through /proc/[pid]/comm and changed with
prctl(PR_SET_NAME).
binary: Option<File>File information for the process executable.
libraries: Vec<File>File information for libraries loaded by the process.
script: Option<File>When the process represents the invocation of a script, binary provides
information about the interpreter, while script provides information
about the script file provided to the interpreter.
args: Vec<String>Process arguments as JSON encoded strings.
arguments_truncated: boolTrue if args is incomplete.
env_variables: Vec<EnvironmentVariable>Process environment variables.
env_variables_truncated: boolTrue if env_variables is incomplete.
pid: i64The process ID.
parent_pid: i64The parent process ID.
user_id: i64The ID of the user that executed the process. E.g. If this is the root user this will always be 0.
Implementations§
Source§impl Process
impl Process
pub fn new() -> Self
Sourcepub fn set_binary<T>(self, v: T) -> Self
pub fn set_binary<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_binary<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_binary<T>(self, v: Option<T>) -> Self
Sourcepub fn set_libraries<T, V>(self, v: T) -> Self
pub fn set_libraries<T, V>(self, v: T) -> Self
Sourcepub fn set_script<T>(self, v: T) -> Self
pub fn set_script<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_script<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_script<T>(self, v: Option<T>) -> Self
Sourcepub fn set_arguments_truncated<T: Into<bool>>(self, v: T) -> Self
pub fn set_arguments_truncated<T: Into<bool>>(self, v: T) -> Self
Sets the value of arguments_truncated.
§Example
let x = Process::new().set_arguments_truncated(true);Sourcepub fn set_env_variables<T, V>(self, v: T) -> Self
pub fn set_env_variables<T, V>(self, v: T) -> Self
Sets the value of env_variables.
§Example
use google_cloud_securitycenter_v2::model::EnvironmentVariable;
let x = Process::new()
.set_env_variables([
EnvironmentVariable::default()/* use setters */,
EnvironmentVariable::default()/* use (different) setters */,
]);Sourcepub fn set_env_variables_truncated<T: Into<bool>>(self, v: T) -> Self
pub fn set_env_variables_truncated<T: Into<bool>>(self, v: T) -> Self
Sets the value of env_variables_truncated.
§Example
let x = Process::new().set_env_variables_truncated(true);