[][src]Crate macsmc

SMC client for macOS

Examples

let mut smc = Smc::connect()?;
let cpu_temp = smc.cpu_temperature()?;
assert!(*cpu_temp.proximity > 0.0);
// will disconnect
drop(smc);

See Smc for the starting point.

Structs

BatteryDetail

Various information about the battery in detail

BatteryInfo

Various information about the battery in general.

BatteryIter

Iterator for BatteryDetails.

Celsius

Temperature in Celsius (centigrade) scale. This is the default scale being used.

CpuIter

Iterator for the Celsius temperatures of all cpu cores.

CpuPower

Various power related values of the CPU. If a sensor is missing, the value is 0.0

CpuTemperatures

Combination of various CPU Temperatures If a sensor is missing, the value is 0.0

DataIter

Iterator for all Dbgs.

Dbg

Return type for a debug command. Does not interpret the data.

DbgKeyInfo

Return type for a debug command. Does not interpret the data.

Fahrenheit

Temperature in Fahrenheit scale. To convert from Celsius to Fahrenheit:

FanIter

Iterator for FanSpeeds.

FanSpeed

Collection of various speeds about a single fan. If a sensor is missing, the value is 0.0

GpuTemperatures

Combination of various CPU Temperatures If a sensor is missing, the value is 0.0

KeysIter

Iterator for all DbgKeyInfos.

MilliAmpere

Value wrapper for values that are mA units

MilliAmpereHours

Value wrapper for values that are mAh units

OtherTemperatures

Various other CPU temperatures. This list is not exhaustive nor are the sensors commonly available. If a sensor is missing, the value is 0.0

Rpm

Unit for fan speed (RPM = Revolutions per minute)

SmcmacOS

The SMC client. All methods take self as a mutable reference, even though it is technically not required. This is to make sure, that a single connection can only be used by one reference at a time.

Volt

Value wrapper for values that are V units

Watt

Value wrapper for values that are W units

Enums

DataValue

Raw data value from a sensor

Error

Possible errors that can happen

FanMode

How a fan is being operated.

Type Definitions

Result

This crates result type