Module driver

Source
Expand description

Defines types and interfaces that drivers use to interact with the core of DrMem.

Structs§

RequestChan
A handle which is used to communicate with the core of DrMem. When a driver is created, it will be given a handle to be used throughout its life.

Enums§

Request
Defines the requests that can be sent to core. Drivers don’t use this type directly. They are indirectly used by RequestChan.

Traits§

API
All drivers implement the driver::API trait.

Type Aliases§

DriverConfig
Represents how configuration information is given to a driver. Since each driver can have vastly different requirements, the config structure needs to be as general as possible. A DriverConfig type is a map with String keys and toml::Value values.
DriverType
Defines a boxed type that supports the driver::API trait.
Name
Represents the type used to specify the name of a driver.
ReportReading
A function that drivers use to report updated values of a device.
RxDeviceSetting
Used by a driver to receive settings from a client.
SettingReply
A closure type that defines how a driver replies to a setting request. It can return Ok() to show what value was actually used or Err() to indicate the setting failed.
SettingRequest
This type represents the data that is transferred in the communication channel. It simplifies the next two types.
SettingStream
The driver is given a stream that yields setting requests. If the driver uses a type that can be converted to and from a device::Value, this stream will automatically reject settings that aren’t of the correct type and pass on converted values.
TxDeviceSetting
Used by client APIs to send setting requests to a driver.