authenticator::backup::andotp

Struct AndOTP

Source
pub struct AndOTP {
    pub secret: String,
    pub issuer: String,
    pub label: String,
    pub digits: u32,
    pub method: Method,
    pub algorithm: Algorithm,
    pub thumbnail: Option<String>,
    pub last_used: i64,
    pub used_frequency: i32,
    pub counter: Option<u32>,
    pub tags: Vec<String>,
    pub period: Option<u32>,
}

Fields§

§secret: String§issuer: String§label: String§digits: u32§method: Method§algorithm: Algorithm§thumbnail: Option<String>§last_used: i64§used_frequency: i32§counter: Option<u32>§tags: Vec<String>§period: Option<u32>

Trait Implementations§

Source§

impl Backupable for AndOTP

Source§

const ENCRYPTABLE: bool = false

Indicates that the GUI might need to prompt for a password.
Source§

const IDENTIFIER: &'static str = "andotp"

Source§

fn title() -> String

Source§

fn subtitle() -> String

Source§

fn backup(model: &ProvidersModel, _key: Option<&str>) -> Result<Vec<u8>>

Source§

impl<'de> Deserialize<'de> for AndOTP

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Drop for AndOTP

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Restorable for AndOTP

Source§

const ENCRYPTABLE: bool = false

Indicates that the GUI might need to prompt for a password.
Source§

const SCANNABLE: bool = false

Indicates that the GUI needs to show a QR code scanner.
Source§

const IDENTIFIER: &'static str = "andotp"

Source§

type Item = AndOTP

Source§

fn title() -> String

Source§

fn subtitle() -> String

Source§

fn restore_from_data(from: &[u8], _key: Option<&str>) -> Result<Vec<Self::Item>>

Restore many items from a slice of data, optionally using a key to unencrypt it. Read more
Source§

impl RestorableItem for AndOTP

Source§

fn account(&self) -> String

Source§

fn issuer(&self) -> String

Source§

fn secret(&self) -> String

Source§

fn period(&self) -> Option<u32>

Source§

fn method(&self) -> Method

Source§

fn algorithm(&self) -> Algorithm

Source§

fn digits(&self) -> Option<u32>

Source§

fn counter(&self) -> Option<u32>

Source§

fn restore(&self, provider: &ProvidersModel) -> Result<()>

Source§

impl Serialize for AndOTP

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Zeroize for AndOTP

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.

Auto Trait Implementations§

§

impl Freeze for AndOTP

§

impl RefUnwindSafe for AndOTP

§

impl Send for AndOTP

§

impl Sync for AndOTP

§

impl Unpin for AndOTP

§

impl UnwindSafe for AndOTP

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoSql for T

§

fn into_sql<T>(self) -> Self::Expression
where Self: Sized + AsExpression<T>, T: SqlType + TypedExpressionType,

Convert self to an expression for Diesel’s query builder. Read more
§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T