Module libmacchina::traits[][src]

This module contains all the traits and types for creating a cross-platform API to query different readouts from various operating systems. For each operating system, there must be an implementation of these traits.

Enums

BatteryState
PackageManager
ReadoutError

This enum contains possible error types when doing sensor & variable readouts.

Traits

BatteryReadout

This trait provides the necessary functions for querying battery statistics from the host computer. A desktop computer might not be able to provide values such as percentage and status, which means a ReadoutError can be returned.

GeneralReadout

This trait provides the interface for implementing functionality used for querying general information about the running operating system and current user.

KernelReadout

This trait is used for implementing common functions for reading kernel properties, such as kernel name and version.

MemoryReadout

This trait provides common functions for querying the current memory state of the host device, most notably free and used.

PackageReadout

This trait provides the interface for implementing functionality used for counting packages on the host system. Almost all modern operating systems use some kind of package managers.

ProductReadout

This trait provides the interface for implementing functionality used for getting product information about the hosts operating system.