pub trait INSProcessInfo: PNSObject {
Show 32 methods
// Provided methods
fn p_process_info() -> NSProcessInfo { ... }
fn p_arguments(&self) -> NSArray<NSString> { ... }
fn p_environment(&self) -> NSDictionary<NSString, NSString> { ... }
fn p_globally_unique_string(&self) -> NSString { ... }
fn p_mac_catalyst_app(&self) -> bool { ... }
fn p_ios_app_on_mac(&self) -> bool { ... }
fn p_process_identifier(&self) -> Int { ... }
fn p_process_name(&self) -> NSString { ... }
fn p_set_process_name(&mut self, name: NSString) { ... }
fn p_user_name(&self) -> NSString { ... }
fn p_full_user_name(&self) -> NSString { ... }
fn m_disable_sudden_termination(&mut self) { ... }
fn m_enable_sudden_termination(&mut self) { ... }
fn m_disable_automatic_termination(&mut self, reason: &NSString) { ... }
fn m_enable_automatic_termination(&mut self, reason: &NSString) { ... }
fn p_automatic_termination_support_enabled(&self) -> bool { ... }
fn p_host_name(&self) -> NSString { ... }
fn p_operating_system_version_string(&self) -> NSString { ... }
fn p_operating_system_version(&self) -> NSOperatingSystemVersion { ... }
fn m_is_operating_system_at_least_version(
&self,
version: NSOperatingSystemVersion,
) -> bool { ... }
fn m_operating_system(&self) -> UInt { ... }
fn m_operating_system_name(&self) -> NSString { ... }
fn p_processor_count(&self) -> UInt { ... }
fn p_active_processor_count(&self) -> UInt { ... }
fn p_physical_memory(&self) -> c_ulonglong { ... }
fn p_system_uptime(&self) -> NSTimeInterval { ... }
fn m_begin_activity_with_options_reason(
&self,
options: NSActivityOptions,
reason: &NSString,
) -> id { ... }
fn m_end_activity(&self, activity: id) { ... }
fn m_perform_activity_with_options_reason_using_block<F>(
&self,
activity: id,
reason: &NSString,
block: F,
)
where F: IntoConcreteBlock<(), Ret = ()> + 'static { ... }
fn m_perform_expiring_activity_with_reason_using_block<F>(
&self,
reason: &NSString,
block: F,
)
where F: IntoConcreteBlock<(bool,), Ret = ()> + 'static { ... }
fn p_thermal_state(&self) -> NSProcessInfoThermalState { ... }
fn p_low_power_mode_enabled(&self) -> bool { ... }
}
Expand description
A trait containing all the methods for NSProcessInfo
Provided Methods§
Sourcefn p_process_info() -> NSProcessInfo
fn p_process_info() -> NSProcessInfo
Returns the process information agent for the process.
Sourcefn p_arguments(&self) -> NSArray<NSString>
fn p_arguments(&self) -> NSArray<NSString>
Array of strings with the command-line arguments for the process.
Sourcefn p_environment(&self) -> NSDictionary<NSString, NSString>
fn p_environment(&self) -> NSDictionary<NSString, NSString>
The variable names (keys) and their values in the environment from which the process was launched.
Sourcefn p_globally_unique_string(&self) -> NSString
fn p_globally_unique_string(&self) -> NSString
Global unique identifier for the process.
Sourcefn p_mac_catalyst_app(&self) -> bool
fn p_mac_catalyst_app(&self) -> bool
A Boolean value that indicates whether the process originated as an iOS app and runs on macOS.
Sourcefn p_ios_app_on_mac(&self) -> bool
fn p_ios_app_on_mac(&self) -> bool
A Boolean value that indicates whether the process is an iPhone or iPad app running on a Mac.
Sourcefn p_process_identifier(&self) -> Int
fn p_process_identifier(&self) -> Int
The identifier of the process (often called process ID).
Sourcefn p_process_name(&self) -> NSString
fn p_process_name(&self) -> NSString
The name of the process.
Sourcefn p_set_process_name(&mut self, name: NSString)
fn p_set_process_name(&mut self, name: NSString)
Sets the name of the process
§Warning
User defaults and other aspects of the environment might depend on the process name, so be very careful if you change it. Setting the process name in this manner is not thread safe.
Sourcefn p_user_name(&self) -> NSString
fn p_user_name(&self) -> NSString
Returns the account name of the current user.
Sourcefn p_full_user_name(&self) -> NSString
fn p_full_user_name(&self) -> NSString
Returns the full name of the current user.
Sourcefn m_disable_sudden_termination(&mut self)
fn m_disable_sudden_termination(&mut self)
Disables the application for quickly killing using sudden termination.
Sourcefn m_enable_sudden_termination(&mut self)
fn m_enable_sudden_termination(&mut self)
Enables the application for quick killing using sudden termination.
Sourcefn m_disable_automatic_termination(&mut self, reason: &NSString)
fn m_disable_automatic_termination(&mut self, reason: &NSString)
Disables automatic termination for the application.
Sourcefn m_enable_automatic_termination(&mut self, reason: &NSString)
fn m_enable_automatic_termination(&mut self, reason: &NSString)
Enables automatic termination for the application.
Sourcefn p_automatic_termination_support_enabled(&self) -> bool
fn p_automatic_termination_support_enabled(&self) -> bool
A Boolean value indicating whether the app supports automatic termination.
Sourcefn p_host_name(&self) -> NSString
fn p_host_name(&self) -> NSString
The name of the host computer on which the process is executing.
Sourcefn p_operating_system_version_string(&self) -> NSString
fn p_operating_system_version_string(&self) -> NSString
A string containing the version of the operating system on which the process is executing.
Sourcefn p_operating_system_version(&self) -> NSOperatingSystemVersion
fn p_operating_system_version(&self) -> NSOperatingSystemVersion
The version of the operating system on which the process is executing.
Sourcefn m_is_operating_system_at_least_version(
&self,
version: NSOperatingSystemVersion,
) -> bool
fn m_is_operating_system_at_least_version( &self, version: NSOperatingSystemVersion, ) -> bool
Returns a Boolean value indicating whether the version of the operating system on which the process is executing is the same or later than the given version.
Sourcefn m_operating_system(&self) -> UInt
👎Deprecated: Use operating_system_version
or is_operating_system_at_least_version
instead
fn m_operating_system(&self) -> UInt
operating_system_version
or is_operating_system_at_least_version
insteadReturns a constant to indicate the operating system on which the process is executing.
Sourcefn m_operating_system_name(&self) -> NSString
👎Deprecated: Use operating_system_version
or is_operating_system_at_least_version
instead
fn m_operating_system_name(&self) -> NSString
operating_system_version
or is_operating_system_at_least_version
insteadReturns a string containing the name of the operating system on which the process is executing.
Sourcefn p_processor_count(&self) -> UInt
fn p_processor_count(&self) -> UInt
The number of processing cores available on the computer.
Sourcefn p_active_processor_count(&self) -> UInt
fn p_active_processor_count(&self) -> UInt
The number of active processing cores available on the computer.
Sourcefn p_physical_memory(&self) -> c_ulonglong
fn p_physical_memory(&self) -> c_ulonglong
The amount of physical memory on the computer in bytes.
Sourcefn p_system_uptime(&self) -> NSTimeInterval
fn p_system_uptime(&self) -> NSTimeInterval
The amount of time the system has been awake since the last time it was restarted.
Sourcefn m_begin_activity_with_options_reason(
&self,
options: NSActivityOptions,
reason: &NSString,
) -> id
fn m_begin_activity_with_options_reason( &self, options: NSActivityOptions, reason: &NSString, ) -> id
Begin an activity using the given options and reason.
Sourcefn m_end_activity(&self, activity: id)
fn m_end_activity(&self, activity: id)
Ends the given activity.
Sourcefn m_perform_activity_with_options_reason_using_block<F>(
&self,
activity: id,
reason: &NSString,
block: F,
)
fn m_perform_activity_with_options_reason_using_block<F>( &self, activity: id, reason: &NSString, block: F, )
Synchronously perform an activity defined by a given block using the given options.
Sourcefn m_perform_expiring_activity_with_reason_using_block<F>(
&self,
reason: &NSString,
block: F,
)
fn m_perform_expiring_activity_with_reason_using_block<F>( &self, reason: &NSString, block: F, )
Performs the specified block asynchronously and notifies you if the process is about to be suspended.
Sourcefn p_thermal_state(&self) -> NSProcessInfoThermalState
fn p_thermal_state(&self) -> NSProcessInfoThermalState
The current thermal state of the system.
Sourcefn p_low_power_mode_enabled(&self) -> bool
fn p_low_power_mode_enabled(&self) -> bool
A Boolean value that indicates the current state of Low Power Mode.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.