pub struct ProcessInfo(/* private fields */);Expand description
An Objective-C process info object.
C++ equivalent: NS::ProcessInfo
Implementations§
Source§impl ProcessInfo
impl ProcessInfo
Sourcepub fn process_info() -> Option<Self>
pub fn process_info() -> Option<Self>
Get the process info singleton.
C++ equivalent: static ProcessInfo* processInfo()
Sourcepub fn arguments(&self) -> *mut Array<String>
pub fn arguments(&self) -> *mut Array<String>
Get the command-line arguments.
C++ equivalent: class Array* arguments() const
Sourcepub fn environment(&self) -> *mut Dictionary
pub fn environment(&self) -> *mut Dictionary
Get the environment dictionary.
C++ equivalent: class Dictionary* environment() const
Sourcepub fn host_name(&self) -> *mut String
pub fn host_name(&self) -> *mut String
Get the host name.
C++ equivalent: class String* hostName() const
Sourcepub fn process_name(&self) -> *mut String
pub fn process_name(&self) -> *mut String
Get the process name.
C++ equivalent: class String* processName() const
Sourcepub fn set_process_name(&self, name: &String)
pub fn set_process_name(&self, name: &String)
Set the process name.
C++ equivalent: void setProcessName(const String* pString)
Sourcepub fn process_identifier(&self) -> i32
pub fn process_identifier(&self) -> i32
Get the process identifier.
C++ equivalent: int processIdentifier() const
Sourcepub fn globally_unique_string(&self) -> *mut String
pub fn globally_unique_string(&self) -> *mut String
Get a globally unique string.
C++ equivalent: class String* globallyUniqueString() const
Sourcepub fn full_user_name(&self) -> *mut String
pub fn full_user_name(&self) -> *mut String
Get the full user name.
Sourcepub fn operating_system(&self) -> UInteger
pub fn operating_system(&self) -> UInteger
Get the operating system identifier.
C++ equivalent: UInteger operatingSystem() const
Sourcepub fn operating_system_version(&self) -> OperatingSystemVersion
pub fn operating_system_version(&self) -> OperatingSystemVersion
Get the operating system version.
C++ equivalent: OperatingSystemVersion operatingSystemVersion() const
Sourcepub fn operating_system_version_string(&self) -> *mut String
pub fn operating_system_version_string(&self) -> *mut String
Get the operating system version string.
C++ equivalent: class String* operatingSystemVersionString() const
Sourcepub fn is_operating_system_at_least_version(
&self,
version: OperatingSystemVersion,
) -> bool
pub fn is_operating_system_at_least_version( &self, version: OperatingSystemVersion, ) -> bool
Check if the operating system is at least a given version.
C++ equivalent: bool isOperatingSystemAtLeastVersion(OperatingSystemVersion version) const
Sourcepub fn processor_count(&self) -> UInteger
pub fn processor_count(&self) -> UInteger
Get the processor count.
C++ equivalent: UInteger processorCount() const
Sourcepub fn active_processor_count(&self) -> UInteger
pub fn active_processor_count(&self) -> UInteger
Get the active processor count.
C++ equivalent: UInteger activeProcessorCount() const
Sourcepub fn physical_memory(&self) -> u64
pub fn physical_memory(&self) -> u64
Get the physical memory size.
C++ equivalent: unsigned long long physicalMemory() const
Sourcepub fn system_uptime(&self) -> TimeInterval
pub fn system_uptime(&self) -> TimeInterval
Get the system uptime.
C++ equivalent: TimeInterval systemUptime() const
Sourcepub fn disable_sudden_termination(&self)
pub fn disable_sudden_termination(&self)
Disable sudden termination.
C++ equivalent: void disableSuddenTermination()
Sourcepub fn enable_sudden_termination(&self)
pub fn enable_sudden_termination(&self)
Enable sudden termination.
C++ equivalent: void enableSuddenTermination()
Sourcepub fn disable_automatic_termination(&self, reason: &String)
pub fn disable_automatic_termination(&self, reason: &String)
Disable automatic termination.
C++ equivalent: void disableAutomaticTermination(const class String* pReason)
Sourcepub fn enable_automatic_termination(&self, reason: &String)
pub fn enable_automatic_termination(&self, reason: &String)
Enable automatic termination.
C++ equivalent: void enableAutomaticTermination(const class String* pReason)
Sourcepub fn automatic_termination_support_enabled(&self) -> bool
pub fn automatic_termination_support_enabled(&self) -> bool
Check if automatic termination support is enabled.
C++ equivalent: bool automaticTerminationSupportEnabled() const
Sourcepub fn set_automatic_termination_support_enabled(&self, enabled: bool)
pub fn set_automatic_termination_support_enabled(&self, enabled: bool)
Set automatic termination support enabled.
C++ equivalent: void setAutomaticTerminationSupportEnabled(bool enabled)
Sourcepub fn begin_activity(
&self,
options: ActivityOptions,
reason: &String,
) -> *mut Object
pub fn begin_activity( &self, options: ActivityOptions, reason: &String, ) -> *mut Object
Begin an activity.
C++ equivalent: class Object* beginActivity(ActivityOptions options, const class String* pReason)
Sourcepub fn end_activity(&self, activity: &Object)
pub fn end_activity(&self, activity: &Object)
End an activity.
C++ equivalent: void endActivity(class Object* pActivity)
Sourcepub fn thermal_state(&self) -> ProcessInfoThermalState
pub fn thermal_state(&self) -> ProcessInfoThermalState
Get the thermal state.
C++ equivalent: ProcessInfoThermalState thermalState() const
Sourcepub fn is_low_power_mode_enabled(&self) -> bool
pub fn is_low_power_mode_enabled(&self) -> bool
Check if low power mode is enabled.
C++ equivalent: bool isLowPowerModeEnabled() const
Sourcepub fn is_ios_app_on_mac(&self) -> bool
pub fn is_ios_app_on_mac(&self) -> bool
Check if this is an iOS app running on Mac.
C++ equivalent: bool isiOSAppOnMac() const
Sourcepub fn is_mac_catalyst_app(&self) -> bool
pub fn is_mac_catalyst_app(&self) -> bool
Check if this is a Mac Catalyst app.
C++ equivalent: bool isMacCatalystApp() const
Sourcepub fn is_device_certified(&self, performance_tier: DeviceCertification) -> bool
pub fn is_device_certified(&self, performance_tier: DeviceCertification) -> bool
Check if the device is certified.
C++ equivalent: bool isDeviceCertified(DeviceCertification performanceTier) const
Sourcepub fn has_performance_profile(
&self,
performance_profile: ProcessPerformanceProfile,
) -> bool
pub fn has_performance_profile( &self, performance_profile: ProcessPerformanceProfile, ) -> bool
Check if the process has a performance profile.
C++ equivalent: bool hasPerformanceProfile(ProcessPerformanceProfile performanceProfile) const
Trait Implementations§
Source§impl Clone for ProcessInfo
impl Clone for ProcessInfo
Source§fn clone(&self) -> ProcessInfo
fn clone(&self) -> ProcessInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more