pub struct AppState {
pub workspaces: Vec<Workspace>,
pub layouts: HashMap<WorkspaceId, LayoutNode>,
pub active: Option<WorkspaceId>,
pub focused: Option<HarnessId>,
pub mail: Vec<Mail>,
pub activity: Vec<Activity>,
pub choices: Vec<Choice>,
}Fields§
§workspaces: Vec<Workspace>§layouts: HashMap<WorkspaceId, LayoutNode>§active: Option<WorkspaceId>§focused: Option<HarnessId>§mail: Vec<Mail>§activity: Vec<Activity>§choices: Vec<Choice>Implementations§
Source§impl AppState
impl AppState
Sourcepub fn load() -> Option<Self>
pub fn load() -> Option<Self>
Missing file means a fresh start; a corrupt one is kept aside rather than overwritten, so a bad write never silently loses workspaces.
pub fn next_harness_id(&self) -> HarnessId
pub fn next_workspace_id(&self) -> WorkspaceId
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppState
impl<'de> Deserialize<'de> for AppState
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 Forget for AppState
impl Freeze for AppState
impl Move for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl UnwindSafe for AppState
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