pub struct Device<D: HidDevice> { /* private fields */ }
Expand description

A connected CTAPHID device.

Implementations

Connects to a HID device, assuming that it is a CTAPHID device, and initializes the communication channel using the default Options.

Connects to a HID device, assuming that it is a CTAPHID device, and initializes the communication channel using the given options.

Pings the device sending the given data and checks that it sends the same data back.

If the data returned by the device does not match the sent data, CommandError::InvalidPingData is returned.

Executes the wink command, causing a vendor-defined action that provides some visual or audible identification of a particular authenticator.

Sends the given CTAP1/U2F command to the device and returns the response.

Sends the given CTAP2/CBOR command and data to the device and returns the response status and data.

Locks the device for the given duration to the current channel.

The duration is truncated to whole seconds and capped at ten seconds.

Executes the given vendor-specific command with the given data.

Returns information about this device.

Returns the protocol version implemented by this device.

Returns the version of this device.

Returns the capabilities of this device.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

Attempts to convert self into T using TryInto<T>. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.