pub struct Stored {
pub secret: String,
pub params: Params,
pub issuer: Option<String>,
pub account: Option<String>,
}Expand description
A parsed seed: the base32 secret plus everything the URI said about it.
Fields§
§secret: StringBase32, uppercased, with the grouping spaces and any padding removed.
params: Params§issuer: Option<String>The service, when the URI named one. Never overwrites an entry’s
provider — see unv-cli’s --totp handling; it is offered, not applied.
account: Option<String>The account at that service, when the URI named one.
Implementations§
Source§impl Stored
impl Stored
Sourcepub fn to_uri(&self, issuer_fallback: &str, account_fallback: &str) -> String
pub fn to_uri(&self, issuer_fallback: &str, account_fallback: &str) -> String
Rebuilds an otpauth:// URI, for exporting the seed back to a phone.
The URI contains the secret, so every caller of this is a
materialising path: it is refused to stdout without --reveal, exactly
as the seed itself is.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stored
impl<'de> Deserialize<'de> for Stored
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 Stored
impl StructuralPartialEq for Stored
Auto Trait Implementations§
impl Freeze for Stored
impl RefUnwindSafe for Stored
impl Send for Stored
impl Sync for Stored
impl Unpin for Stored
impl UnsafeUnpin for Stored
impl UnwindSafe for Stored
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
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.