Struct nitrokey::User

source ·
pub struct User<T: Device> { /* private fields */ }
Expand description

A Nitrokey device with user authentication.

To obtain an instance of this struct, use the [authenticate_user][] method from the Authenticate trait. To get back to an unauthenticated device, use the device method.

Implementations

Forgets the user authentication and returns an unauthenticated device. This method consumes the authenticated device. It does not perform any actual commands on the Nitrokey.

Trait Implementations

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Generates an HOTP code on the given slot. This operation may require user authorization, depending on the device configuration (see get_config). Read more
Generates a TOTP code on the given slot. This operation may require user authorization, depending on the device configuration (see get_config). Read more
Sets the time on the Nitrokey. This command may set the time to arbitrary values. time is the number of seconds since January 1st, 1970 (Unix timestamp). Read more
Returns the name of the given HOTP slot. Read more
Returns the name of the given TOTP slot. 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

Returns the argument unchanged.

Calls U::from(self).

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

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.