pub trait AuthTwoFactor:
Clone
+ Send
+ Sync
+ Serialize
+ Debug
+ 'static {
// Required methods
fn id(&self) -> &str;
fn secret(&self) -> &str;
fn backup_codes(&self) -> Option<&str>;
fn user_id(&self) -> &str;
fn created_at(&self) -> DateTime<Utc>;
fn updated_at(&self) -> DateTime<Utc>;
}Expand description
Trait representing a two-factor authentication entity.
Required Methods§
fn id(&self) -> &str
fn secret(&self) -> &str
fn backup_codes(&self) -> Option<&str>
fn user_id(&self) -> &str
fn created_at(&self) -> DateTime<Utc>
fn updated_at(&self) -> DateTime<Utc>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.