pub struct LiveCode {
pub code: String,
pub next_code: Option<String>,
pub kind: Kind,
pub counter: u64,
pub remaining_secs: u64,
pub period: u64,
pub digits: u32,
pub algorithm: Algorithm,
}Expand description
A code and how long it has left — the shape the desktop app and the CLI both render.
Fields§
§code: String§next_code: Option<String>The code that replaces code, when the caller asked for it.
Absent unless requested: it is a second live credential, and a panel that always painted one would put two working codes in every screenshot.
kind: KindWhat produced it, so a renderer knows whether a countdown means anything.
counter: u64The counter this code was generated at. For an Hotp seed it is the
entry’s stored position, which is what the user is deciding whether to
advance.
remaining_secs: u64Seconds until code is replaced, or 0 for an Hotp seed, which has
no clock and whose code is replaced only when somebody advances it.
period: u64Echoed back so a caller can draw a countdown without re-deriving it from the entry, and so a stale response is recognisable as stale.
digits: u32§algorithm: Algorithm