diff --git a/src/ctap/hid/mod.rs b/src/ctap/hid/mod.rs index fdc2daa..652a07c 100644 --- a/src/ctap/hid/mod.rs +++ b/src/ctap/hid/mod.rs @@ -119,13 +119,16 @@ pub enum KeepaliveStatus { /// If you want more control, you can also do the processing in steps: /// /// 1. `HidPacket` -> `Option` -/// `parse_packet` assembles the message and preprocesses all pure HID commands and errors. /// 2. `Option` -> `Message` -/// If you didn't receive any message or preprocessing discarded it, stop. /// 3. `Message` -> `Message` -/// `process_message` handles all protocol interactions. -/// 4. `Message` -> `HidPacketIterator -/// `split_message` creates packets out of the response message. +/// 4. `Message` -> `HidPacketIterator` +/// +/// These steps correspond to: +/// +/// 1. `parse_packet` assembles the message and preprocesses all pure HID commands and errors. +/// 2. If you didn't receive any message or preprocessing discarded it, stop. +/// 3. `process_message` handles all protocol interactions. +/// 4. `split_message` creates packets out of the response message. pub struct CtapHid { assembler: MessageAssembler, // The specification only requires unique CIDs, the allocation algorithm is vendor specific. @@ -484,6 +487,7 @@ impl CtapHid { }) } + /// Returns whether a wink permission is currently granted. pub fn should_wink(&self, now: ClockValue) -> bool { self.wink_permission.is_granted(now) } diff --git a/src/ctap/hid/send.rs b/src/ctap/hid/send.rs index 57029c8..d919e68 100644 --- a/src/ctap/hid/send.rs +++ b/src/ctap/hid/send.rs @@ -14,6 +14,9 @@ use super::{CtapHid, HidPacket, Message}; +/// Iterator for HID packets. +/// +/// The `new` constructor splits the CTAP `Message` into `HidPacket`s for sending over USB. pub struct HidPacketIterator(Option); impl HidPacketIterator {