pub struct StoredAccount {Show 14 fields
pub id: u64,
pub name: String,
pub display_name: String,
pub avatar_url: Option<String>,
pub notes: String,
pub game_notes: BTreeMap<String, String>,
pub added_at: f64,
pub last_played_at: Option<f64>,
pub play_count: u64,
pub widget_data: BTreeMap<String, Value>,
pub place_id: Option<String>,
pub last_place_id: Option<String>,
pub pinned: bool,
pub extra: Map<String, Value>,
}Expand description
A saved account. The session is stored separately in the credential store.
Fields§
§id: u64§name: String§display_name: String§avatar_url: Option<String>§notes: String§game_notes: BTreeMap<String, String>Notes shown while a game is the default destination, by place ID. notes is shown when no
game is.
added_at: f64Unix time, in seconds, the account was added.
last_played_at: Option<f64>Unix time, in seconds, of the last manual join.
play_count: u64Number of manual joins.
widget_data: BTreeMap<String, Value>Per-widget data for this account, keyed by widget ID.
place_id: Option<String>Place this account joins instead of the default place.
last_place_id: Option<String>Place of the last manual join.
pinned: boolShown on the dashboard.
extra: Map<String, Value>Unknown fields, kept when saving.
Implementations§
Source§impl StoredAccount
impl StoredAccount
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Checks the IDs, dates, place IDs, and widget IDs, and rejects fields that look like secrets. Returns a user-facing message on failure.
Sourcepub fn remove_secrets(&mut self) -> bool
pub fn remove_secrets(&mut self) -> bool
Removes unknown fields that look like secrets, such as the cookies older versions saved with each account. Returns whether any were removed.