pub enum Format {
OtpauthList,
Aegis,
TwoFas,
AndOtp,
Bitwarden,
GoogleMigration,
}Expand description
An export format this module can read, write, or both.
Variants§
OtpauthList
One otpauth:// URI per line. What Ente Auth’s plain-text export is,
and what KeePassXC, Raivo, Proton Pass and most others accept back.
Aegis
Aegis Authenticator’s unencrypted JSON vault.
TwoFas
2FAS Auth’s unencrypted JSON backup.
AndOtp
andOTP’s unencrypted JSON export (also read by FreeOTP+).
Bitwarden
A Bitwarden JSON export — reads login.totp off each item.
GoogleMigration
Google Authenticator’s otpauth-migration://offline?data=… QR payload.
Implementations§
Source§impl Format
impl Format
Sourcepub const EXPORTABLE: [Format; 3]
pub const EXPORTABLE: [Format; 3]
The formats --format accepts on export.
Read-only formats are absent on purpose. Bitwarden’s export is a whole password vault and writing one containing nothing but TOTP seeds would produce a file that imports as a set of empty logins; Google’s migration payload is a QR code this app cannot draw (see Phase 19’s decision about the CSP), so writing the URI behind it would be a format nothing reads.
Sourcepub fn parse(raw: &str) -> Option<Self>
pub fn parse(raw: &str) -> Option<Self>
Parses a --format value.
ente is an alias for otpauth, not a format of its own: Ente Auth’s
plain export is a list of otpauth:// URIs, and its import accepts the
same. The alias exists because somebody with an Ente export will type
--format ente, and being told “unknown format” when the thing works is
a bad answer.
Sourcepub fn is_exportable(self) -> bool
pub fn is_exportable(self) -> bool
Whether build can write this format.
Trait Implementations§
impl Copy for Format
Source§impl<'de> Deserialize<'de> for Format
impl<'de> Deserialize<'de> for Format
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>,
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.