summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-14 16:33:11 +0100
committerRobin Krahl <robin.krahl@ireas.org>2020-01-14 16:54:00 +0100
commitbfe261bd3e2517021bad36612889c44a8b2327dd (patch)
tree311b2280def82099181aa4fc50a1d705678e7ce8 /src
parent2e543445c3059fa9decdbef718caf84696bb8786 (diff)
downloadnitrokey-rs-bfe261bd3e2517021bad36612889c44a8b2327dd.tar.gz
nitrokey-rs-bfe261bd3e2517021bad36612889c44a8b2327dd.tar.bz2
Document background operations
This patch adds a new section about background operations to the crate documentation.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c6c3ff5..9efad91 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -29,6 +29,15 @@
//! passwords – [`get_hotp_code`][] and [`get_totp_code`][]. Depending on the stick configuration,
//! these operations are available without authentication or with user authentication.
//!
+//! # Background operations
+//!
+//! Some commands may start background operations. During such an operation, every new command
+//! will cause a [`WrongCrc`][] error. To check whether a background operation is currently
+//! running, use the [`get_operation_status`][] method.
+//!
+//! Background operations are only available on the Nitrokey Storage. Currently,
+//! [`fill_sd_card`][] is the only command that triggers a background operation.
+//!
//! # Examples
//!
//! Connect to any Nitrokey and print its serial number:
@@ -93,6 +102,8 @@
//! [`connect_path`]: struct.Manager.html#method.connect_path
//! [`connect_pro`]: struct.Manager.html#method.connect_pro
//! [`connect_storage`]: struct.Manager.html#method.connect_storage
+//! [`fill_sd_card`]: struct.Storage.html#method.fill_sd_card
+//! [`get_operation_status`]: struct.Storage.html#method.get_operation_status
//! [`list_devices`]: fn.list_devices.html
//! [`manager`]: trait.Device.html#method.manager
//! [`device`]: struct.User.html#method.device
@@ -101,6 +112,7 @@
//! [`Admin`]: struct.Admin.html
//! [`DeviceWrapper`]: enum.DeviceWrapper.html
//! [`User`]: struct.User.html
+//! [`WrongCrc`]: enum.CommandError.html#variant.WrongCrc
#![warn(missing_docs, rust_2018_compatibility, rust_2018_idioms, unused)]