[−][src]Struct nitrokey::OtpSlotData
The configuration for an OTP slot.
Fields
number: u8
The number of the slot – must be less than three for HOTP and less than 15 for TOTP.
name: String
The name of the slot – must not be empty.
secret: String
The secret for the slot.
mode: OtpMode
The OTP generation mode.
use_enter: bool
If true, press the enter key after sending an OTP code using double-pressed numlock, capslock or scrolllock.
token_id: Option<String>
Set the token ID, see OATH Token Identifier Specification, section “Class A”.
Methods
impl OtpSlotData
[src]
pub fn new<S: Into<String>, T: Into<String>>(
number: u8,
name: S,
secret: T,
mode: OtpMode
) -> OtpSlotData
[src]
number: u8,
name: S,
secret: T,
mode: OtpMode
) -> OtpSlotData
Constructs a new instance of this struct.
pub fn use_enter(self) -> OtpSlotData
[src]
Enables pressing the enter key after sending an OTP code using double-pressed numlock, capslock or scrollock.
pub fn token_id<S: Into<String>>(self, id: S) -> OtpSlotData
[src]
Sets the token ID, see OATH Token Identifier Specification, section “Class A”.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for OtpSlotData
impl Send for OtpSlotData
impl Sync for OtpSlotData
impl Unpin for OtpSlotData
impl UnwindSafe for OtpSlotData
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,