pub trait Restorable: Sized {
    type Item: RestorableItem;

    const IDENTIFIER: &'static str;
    const ENCRYPTABLE: bool = false;
    const SCANNABLE: bool = false;

    // Required methods
    fn title() -> String;
    fn subtitle() -> String;
    fn restore_from_data(
        from: &[u8],
        key: Option<&str>
    ) -> Result<Vec<Self::Item>>;
}

Required Associated Types§

Required Associated Constants§

source

const IDENTIFIER: &'static str

Provided Associated Constants§

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.

Required Methods§

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.

If key is None, then the implementation should assume that the slice is unencrypted, and error if it only supports encrypted slices.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Restorable for Aegis

source§

const ENCRYPTABLE: bool = true

source§

const SCANNABLE: bool = false

source§

const IDENTIFIER: &'static str = "aegis"

§

type Item = Item

source§

impl Restorable for AndOTP

source§

const ENCRYPTABLE: bool = false

source§

const SCANNABLE: bool = false

source§

const IDENTIFIER: &'static str = "andotp"

§

type Item = AndOTP

source§

impl Restorable for Bitwarden

source§

const ENCRYPTABLE: bool = false

source§

const SCANNABLE: bool = false

source§

const IDENTIFIER: &'static str = "bitwarden"

§

type Item = BitwardenItem

source§

impl Restorable for FreeOTP

source§

const ENCRYPTABLE: bool = false

source§

const SCANNABLE: bool = false

source§

const IDENTIFIER: &'static str = "authenticator"

§

type Item = OTPUri

source§

impl Restorable for FreeOTPJSON

source§

const ENCRYPTABLE: bool = false

source§

const SCANNABLE: bool = false

source§

const IDENTIFIER: &'static str = "freeotp_json"

§

type Item = FreeOTPItem

source§

impl Restorable for Google

source§

const ENCRYPTABLE: bool = false

source§

const SCANNABLE: bool = true

source§

const IDENTIFIER: &'static str = "google"

§

type Item = OTPUri

source§

impl Restorable for LegacyAuthenticator

source§

const ENCRYPTABLE: bool = false

source§

const SCANNABLE: bool = false

source§

const IDENTIFIER: &'static str = "authenticator_legacy"

§

type Item = LegacyAuthenticator

source§

impl Restorable for RaivoOTP

source§

const ENCRYPTABLE: bool = true

source§

const SCANNABLE: bool = false

source§

const IDENTIFIER: &'static str = "raivootp"

§

type Item = Item