Cargo Features
[dependencies]
libmedium = { version = "0.11.0", default-features = false, features = ["writeable", "sync", "async", "uom_units", "virtual_sensors", "unrestricted_parsing"] }
- default = sync, virtual_sensors, writeable
-
These default features are set whenever
libmedium
is added without
somewhere in the dependency tree.default-features = false - writeable default
-
Feature that enables the writeable versions of all structs and functions to interact with the system's sensors.
Affects
curr::AsyncWriteableCurrentSensor
,energy::AsyncWriteableEnergySensor
,fan::AsyncWriteableFanSensor
,humidity::AsyncWriteableHumiditySensor
,intrusion::AsyncWriteableIntrusionSensor
,async_sensors::AsyncWriteableSensor
,power::AsyncWriteablePowerSensor
,pwm::AsyncWriteablePwmSensor
,temp::AsyncWriteableTempSensor
,virt::AsyncWriteableVirtualSensor
,virt::writeable_virtual_sensor_from_path
,virt::custom_writeable_virtual_sensor
,voltage::AsyncWriteableVoltageSensor
,curr::WriteableCurrentSensor
,energy::WriteableEnergySensor
,fan::WriteableFanSensor
,humidity::WriteableHumiditySensor
,intrusion::WriteableIntrusionSensor
,sync_sensors::WriteableSensor
,power::WriteablePowerSensor
… - sync default
-
Feature that uses the std library for synchronous I/O.
Affects
hwmon::sync_hwmon
,libmedium::parse_hwmons
,sensors::sync_sensors
… - async = async-trait, tokio
-
Feature that uses the tokio runtime for asynchronous I/O.
Affects
hwmon::async_hwmon
,libmedium::parse_hwmons_async
,sensors::async_sensors
… - uom_units = uom
-
Feature that replaces units with those found in
uom
. - virtual_sensors default
-
Feature that lets you create virtual sensors.
Virtual sensors don't belong to sysfs but can be any file provided by a driver or the user.Affects
async_sensors::virt
,sync_sensors::virt
,tests::VirtualSensorBuilder
… - unrestricted_parsing
-
Feature that enables parsing of arbitrary paths for hwmons and sensors.
It should only be needed for debug and testing purposes.
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.