#[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
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);Sourcepub fn set_parent_pid<T: Into<i64>>(self, v: T) -> Self
pub fn set_parent_pid<T: Into<i64>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Process
Auto Trait Implementations§
impl Freeze for Process
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnsafeUnpin for Process
impl UnwindSafe for Process
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request