pub struct Base<'b> {
pub secret: Secret<'b>,
pub algorithm: Algorithm,
pub digits: Digits,
}
Expand description
Represents OTP base configuration.
Fields§
§secret: Secret<'b>
The secret to use as the key.
algorithm: Algorithm
The algorithm to use.
digits: Digits
The number of digits to return.
Implementations§
Source§impl<'b> Base<'b>
impl<'b> Base<'b>
Sourcepub fn builder() -> BaseBuilder<'b>
pub fn builder() -> BaseBuilder<'b>
Create an instance of Base
using the builder syntax
Source§impl Base<'_>
impl Base<'_>
Trait Implementations§
Source§impl<'de, 'b> Deserialize<'de> for Base<'b>
impl<'de, 'b> Deserialize<'de> for Base<'b>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'b> Eq for Base<'b>
impl<'b> StructuralPartialEq for Base<'b>
Auto Trait Implementations§
impl<'b> Freeze for Base<'b>
impl<'b> RefUnwindSafe for Base<'b>
impl<'b> Send for Base<'b>
impl<'b> Sync for Base<'b>
impl<'b> Unpin for Base<'b>
impl<'b> UnwindSafe for Base<'b>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more