Trait INSProcessInfo

Source
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§

Source

fn p_process_info() -> NSProcessInfo

Returns the process information agent for the process.

Source

fn p_arguments(&self) -> NSArray<NSString>

Array of strings with the command-line arguments for the process.

Source

fn p_environment(&self) -> NSDictionary<NSString, NSString>

The variable names (keys) and their values in the environment from which the process was launched.

Source

fn p_globally_unique_string(&self) -> NSString

Global unique identifier for the process.

Source

fn p_mac_catalyst_app(&self) -> bool

A Boolean value that indicates whether the process originated as an iOS app and runs on macOS.

Source

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.

Source

fn p_process_identifier(&self) -> Int

The identifier of the process (often called process ID).

Source

fn p_process_name(&self) -> NSString

The name of the process.

Source

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.

Source

fn p_user_name(&self) -> NSString

Returns the account name of the current user.

Source

fn p_full_user_name(&self) -> NSString

Returns the full name of the current user.

Source

fn m_disable_sudden_termination(&mut self)

Disables the application for quickly killing using sudden termination.

Source

fn m_enable_sudden_termination(&mut self)

Enables the application for quick killing using sudden termination.

Source

fn m_disable_automatic_termination(&mut self, reason: &NSString)

Disables automatic termination for the application.

Source

fn m_enable_automatic_termination(&mut self, reason: &NSString)

Enables automatic termination for the application.

Source

fn p_automatic_termination_support_enabled(&self) -> bool

A Boolean value indicating whether the app supports automatic termination.

Source

fn p_host_name(&self) -> NSString

The name of the host computer on which the process is executing.

Source

fn p_operating_system_version_string(&self) -> NSString

A string containing the version of the operating system on which the process is executing.

Source

fn p_operating_system_version(&self) -> NSOperatingSystemVersion

The version of the operating system on which the process is executing.

Source

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.

Source

fn m_operating_system(&self) -> UInt

👎Deprecated: Use operating_system_version or is_operating_system_at_least_version instead

Returns a constant to indicate the operating system on which the process is executing.

Source

fn m_operating_system_name(&self) -> NSString

👎Deprecated: Use operating_system_version or is_operating_system_at_least_version instead

Returns a string containing the name of the operating system on which the process is executing.

Source

fn p_processor_count(&self) -> UInt

The number of processing cores available on the computer.

Source

fn p_active_processor_count(&self) -> UInt

The number of active processing cores available on the computer.

Source

fn p_physical_memory(&self) -> c_ulonglong

The amount of physical memory on the computer in bytes.

Source

fn p_system_uptime(&self) -> NSTimeInterval

The amount of time the system has been awake since the last time it was restarted.

Source

fn m_begin_activity_with_options_reason( &self, options: NSActivityOptions, reason: &NSString, ) -> id

Begin an activity using the given options and reason.

Source

fn m_end_activity(&self, activity: id)

Ends the given activity.

Source

fn m_perform_activity_with_options_reason_using_block<F>( &self, activity: id, reason: &NSString, block: F, )
where F: IntoConcreteBlock<(), Ret = ()> + 'static,

Synchronously perform an activity defined by a given block using the given options.

Source

fn m_perform_expiring_activity_with_reason_using_block<F>( &self, reason: &NSString, block: F, )
where F: IntoConcreteBlock<(bool,), Ret = ()> + 'static,

Performs the specified block asynchronously and notifies you if the process is about to be suspended.

Source

fn p_thermal_state(&self) -> NSProcessInfoThermalState

The current thermal state of the system.

Source

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.

Implementors§