diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2018-05-28 18:14:14 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2018-05-28 20:17:14 +0200 |
commit | cea0aed29feef1d07d91670ea63cd6af45efdfee (patch) | |
tree | b7fbf0cc327b3432fefa7a0d9a5693bb672e3fa4 /src/lib.rs | |
parent | ff15cbec83dbd01c8b544453dcb825670d0f7df4 (diff) | |
download | nitrokey-rs-cea0aed29feef1d07d91670ea63cd6af45efdfee.tar.gz nitrokey-rs-cea0aed29feef1d07d91670ea63cd6af45efdfee.tar.bz2 |
Rewrap documentation comments to 100 characters
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -14,12 +14,10 @@ //! device that can perform operations that require authentication. You can use [`device`][] to go //! back to the unauthenticated device. //! -//! This makes sure that you can only execute a command if you have the -//! required access rights. Otherwise, your code will not compile. The only -//! exception are the methods to generate one-time passwords – -//! [`get_hotp_code`][] and [`get_totp_code`][]. Depending on the stick -//! configuration, these operations are available without authentication or -//! with user authentication. +//! This makes sure that you can only execute a command if you have the required access rights. +//! Otherwise, your code will not compile. The only exception are the methods to generate one-time +//! passwords – [`get_hotp_code`][] and [`get_totp_code`][]. Depending on the stick configuration, +//! these operations are available without authentication or with user authentication. //! //! # Examples //! @@ -103,12 +101,12 @@ pub use misc::Authenticate; pub use otp::{ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData}; pub use util::{CommandError, CommandStatus, LogLevel}; -/// Enables or disables debug output. Calling this method with `true` is -/// equivalent to setting the log level to `Debug`; calling it with `false` is -/// equivalent to the log level `Error` (see [`set_log_level`][]). +/// Enables or disables debug output. Calling this method with `true` is equivalent to setting the +/// log level to `Debug`; calling it with `false` is equivalent to the log level `Error` (see +/// [`set_log_level`][]). /// -/// If debug output is enabled, detailed information about the communication -/// with the Nitrokey device is printed to the standard output. +/// If debug output is enabled, detailed information about the communication with the Nitrokey +/// device is printed to the standard output. /// /// [`set_log_level`]: fn.set_log_level.html pub fn set_debug(state: bool) { @@ -117,9 +115,8 @@ pub fn set_debug(state: bool) { } } -/// Sets the log level for libnitrokey. All log messages are written to the -/// standard error stream. Setting the log level enables all log messages on -/// the same or on a higher log level. +/// Sets the log level for libnitrokey. All log messages are written to the standard error stream. +/// Setting the log level enables all log messages on the same or on a higher log level. pub fn set_log_level(level: LogLevel) { unsafe { nitrokey_sys::NK_set_debug_level(level.into()); |