pub struct WorkspaceRegistry { /* private fields */ }
Expand description
Workspace registry for managing multiple workspaces
Implementations§
Source§impl WorkspaceRegistry
impl WorkspaceRegistry
Sourcepub fn add_workspace(&mut self, workspace: Workspace) -> Result<EntityId>
pub fn add_workspace(&mut self, workspace: Workspace) -> Result<EntityId>
Add a workspace
Sourcepub fn get_workspace(&self, id: &str) -> Option<&Workspace>
pub fn get_workspace(&self, id: &str) -> Option<&Workspace>
Get a workspace by ID
Sourcepub fn get_workspace_mut(&mut self, id: &str) -> Option<&mut Workspace>
pub fn get_workspace_mut(&mut self, id: &str) -> Option<&mut Workspace>
Get a workspace by ID (mutable)
Sourcepub fn remove_workspace(&mut self, id: &str) -> Result<()>
pub fn remove_workspace(&mut self, id: &str) -> Result<()>
Remove a workspace
Sourcepub fn set_active_workspace(&mut self, id: Option<String>) -> Result<()>
pub fn set_active_workspace(&mut self, id: Option<String>) -> Result<()>
Set the active workspace
Sourcepub fn get_active_workspace(&self) -> Option<&Workspace>
pub fn get_active_workspace(&self) -> Option<&Workspace>
Get the active workspace
Sourcepub fn get_active_workspace_id(&self) -> Option<&str>
pub fn get_active_workspace_id(&self) -> Option<&str>
Get the active workspace ID
Sourcepub fn get_workspaces(&self) -> Vec<&Workspace>
pub fn get_workspaces(&self) -> Vec<&Workspace>
Get all workspaces
Sourcepub fn get_workspaces_ordered(&self) -> Vec<&Workspace>
pub fn get_workspaces_ordered(&self) -> Vec<&Workspace>
Get all workspaces sorted by order
Sourcepub fn update_workspaces_order(
&mut self,
workspace_ids: Vec<String>,
) -> Result<()>
pub fn update_workspaces_order( &mut self, workspace_ids: Vec<String>, ) -> Result<()>
Update the order of workspaces
Sourcepub fn get_all_routes(&self) -> Vec<Route>
pub fn get_all_routes(&self) -> Vec<Route>
Get all routes from all workspaces
Sourcepub fn create_route_registry(&self) -> Result<RouteRegistry>
pub fn create_route_registry(&self) -> Result<RouteRegistry>
Create a route registry from all workspaces
Trait Implementations§
Source§impl Clone for WorkspaceRegistry
impl Clone for WorkspaceRegistry
Source§fn clone(&self) -> WorkspaceRegistry
fn clone(&self) -> WorkspaceRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WorkspaceRegistry
impl Debug for WorkspaceRegistry
Auto Trait Implementations§
impl Freeze for WorkspaceRegistry
impl RefUnwindSafe for WorkspaceRegistry
impl Send for WorkspaceRegistry
impl Sync for WorkspaceRegistry
impl Unpin for WorkspaceRegistry
impl UnwindSafe for WorkspaceRegistry
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