pub struct TwoFactorSetup { /* private fields */ }Expand description
Provisioning material returned when two-factor authentication is set up.
Its custom fmt::Debug implementation redacts all secret material.
Implementations§
Source§impl TwoFactorSetup
impl TwoFactorSetup
Sourcepub fn new(
success: bool,
secret: String,
otpauth_uri: String,
qr_svg: String,
qr_png_data_uri: String,
) -> Self
pub fn new( success: bool, secret: String, otpauth_uri: String, qr_svg: String, qr_png_data_uri: String, ) -> Self
Creates a provisioning result and its rendered QR artifacts.
Sourcepub fn otpauth_uri(&self) -> &str
pub fn otpauth_uri(&self) -> &str
Returns the OTPAUTH URI suitable for authenticator applications.
Sourcepub fn qr_png_data_uri(&self) -> &str
pub fn qr_png_data_uri(&self) -> &str
Returns the QR artifact as the crate’s encoded image data URI.
Trait Implementations§
Source§impl Clone for TwoFactorSetup
impl Clone for TwoFactorSetup
Source§impl Debug for TwoFactorSetup
impl Debug for TwoFactorSetup
Source§impl<'de> Deserialize<'de> for TwoFactorSetup
impl<'de> Deserialize<'de> for TwoFactorSetup
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 Eq for TwoFactorSetup
Source§impl PartialEq for TwoFactorSetup
impl PartialEq for TwoFactorSetup
Source§impl Serialize for TwoFactorSetup
impl Serialize for TwoFactorSetup
impl StructuralPartialEq for TwoFactorSetup
Auto Trait Implementations§
impl Freeze for TwoFactorSetup
impl RefUnwindSafe for TwoFactorSetup
impl Send for TwoFactorSetup
impl Sync for TwoFactorSetup
impl Unpin for TwoFactorSetup
impl UnsafeUnpin for TwoFactorSetup
impl UnwindSafe for TwoFactorSetup
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