summaryrefslogtreecommitdiff
path: root/src/device
Commit message (Collapse)AuthorAge
* Add the DeviceInfo structRobin Krahl2020-01-07
| | | | | | | | In the next patch, we will add support for the NK_list_devices functions that returns a list of NK_device_info structs with information about the connected devices. This patch introduces the DeviceInfo struct that holds the information returned by NK_list_devices and that can be created from a NK_device_info struct.
* Implement conversion traits for Model and NK_device_modelRobin Krahl2020-01-07
| | | | | | A nitrokey_sys::NK_device_model (= u32) value may correspond to a nitrokey::Model, and vice versa. This patch adds the appropriate From and TryFrom implementations.
* Simplify doc tests with resultsRobin Krahl2019-12-27
| | | | | | Since Rust 1.34.0, we no longer need a `fn main` comment in doc tests that return results. It is sufficient to have an `Ok` return value with type annotations.
* Refactor the device module into submodulesRobin Krahl2019-07-16
This patch splits the rather large device module into the submodules pro, storage and wrapper. This only changes the internal code structure and does not affect the public API.