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

Holds the possible variants for battery status.

PackageManager

The supported package managers whose packages can be extracted.

ReadoutError

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

ShellFormat

The currently running shell is a program, whose path can be relative, or absolute.

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 manager.

ProductReadout

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