pub struct Workspace {
pub id: String,
pub name: String,
pub layout: LayoutType,
pub windows: Vec<String>,
pub focused_window: Option<String>,
}Fields§
§id: String§name: String§layout: LayoutType§windows: Vec<String>§focused_window: Option<String>Implementations§
Source§impl Workspace
impl Workspace
pub fn new(name: String, layout: LayoutType) -> Self
pub fn add_window(&mut self, window_id: String)
pub fn remove_window(&mut self, window_id: &str)
pub fn focus_window(&mut self, window_id: &str)
pub fn get_windows(&self) -> &[String]
pub fn set_layout(&mut self, layout: LayoutType)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Workspace
impl<'de> Deserialize<'de> for Workspace
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 Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
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