#[repr(C)]
pub struct NK_status { pub firmware_version_major: u8, pub firmware_version_minor: u8, pub serial_number_smart_card: u32, pub config_numlock: u8, pub config_capslock: u8, pub config_scrolllock: u8, pub otp_user_password: bool, }
Expand description

Stores the common device status for all Nitrokey devices.

Fields

firmware_version_major: u8

The major firmware version, e. g. 0 in v0.40.

firmware_version_minor: u8

The minor firmware version, e. g. 40 in v0.40.

serial_number_smart_card: u32

The serial number of the smart card.

config_numlock: u8

The HOTP slot to generate a password from if the numlock key is pressed twice (slot 0-1, or any other value to disable the function).

config_capslock: u8

The HOTP slot to generate a password from if the capslock key is pressed twice (slot 0-1, or any other value to disable the function).

config_scrolllock: u8

The HOTP slot to generate a password from if the scrolllock key is pressed twice (slot 0-1, or any other value to disable the function).

otp_user_password: bool

Indicates whether the user password is required to generate an OTP value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.