pub struct State {
pub schema: u32,
pub machine: String,
pub accounts: Vec<Account>,
pub active: Option<String>,
pub discarded: Vec<String>,
}Fields§
§schema: u32§machine: String§accounts: Vec<Account>§active: Option<String>§discarded: Vec<String>Parked items no account refers to any more. Listed in the same save that drops them and removed once deleted, so a delete that fails or is interrupted is retried.
Implementations§
Source§impl State
impl State
pub fn get(&self, label: &str) -> Option<&Account>
pub fn by_uuid(&self, uuid: &str) -> Option<&Account>
Sourcepub fn park(&mut self, label: &str, park: Park)
pub fn park(&mut self, label: &str, park: Park)
Hold park for the account, discarding whatever it replaces.
Sourcepub fn discard(&mut self, service: &str)
pub fn discard(&mut self, service: &str)
Stop holding service and list it for deletion: it has been installed, or it copies a
login that is still signed in.
pub fn references(&self, service: &str) -> bool
pub fn upsert(&mut self, account: Account)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
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
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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