pub struct CoreBridge { /* private fields */ }Expand description
Bridge service for integrating collaboration workspaces with core workspaces
Implementations§
Source§impl CoreBridge
impl CoreBridge
Sourcepub fn team_to_core(
&self,
team_workspace: &TeamWorkspace,
) -> Result<CoreWorkspace>
pub fn team_to_core( &self, team_workspace: &TeamWorkspace, ) -> Result<CoreWorkspace>
Convert a TeamWorkspace to a Core Workspace
Extracts the full workspace data from the TeamWorkspace.config field and reconstructs a Core Workspace object.
Sourcepub fn core_to_team(
&self,
core_workspace: &CoreWorkspace,
owner_id: Uuid,
) -> Result<TeamWorkspace>
pub fn core_to_team( &self, core_workspace: &CoreWorkspace, owner_id: Uuid, ) -> Result<TeamWorkspace>
Convert a Core Workspace to a TeamWorkspace
Serializes the full workspace data into the TeamWorkspace.config field and creates a TeamWorkspace with collaboration metadata.
Sourcepub fn get_workspace_state(
&self,
team_workspace: &TeamWorkspace,
) -> Result<CoreWorkspace>
pub fn get_workspace_state( &self, team_workspace: &TeamWorkspace, ) -> Result<CoreWorkspace>
Get the full workspace state from a TeamWorkspace
Returns the complete Core Workspace including all mocks, folders, and configuration.
Sourcepub fn update_workspace_state(
&self,
team_workspace: &mut TeamWorkspace,
core_workspace: &CoreWorkspace,
) -> Result<()>
pub fn update_workspace_state( &self, team_workspace: &mut TeamWorkspace, core_workspace: &CoreWorkspace, ) -> Result<()>
Update the workspace state in a TeamWorkspace
Serializes the Core Workspace and stores it in the TeamWorkspace.config field.
Sourcepub async fn load_workspace_from_disk(
&self,
workspace_id: &str,
owner_id: Uuid,
) -> Result<TeamWorkspace>
pub async fn load_workspace_from_disk( &self, workspace_id: &str, owner_id: Uuid, ) -> Result<TeamWorkspace>
Load workspace from disk using WorkspacePersistence
This loads a workspace from the filesystem and converts it to a TeamWorkspace.
Sourcepub async fn save_workspace_to_disk(
&self,
team_workspace: &TeamWorkspace,
) -> Result<()>
pub async fn save_workspace_to_disk( &self, team_workspace: &TeamWorkspace, ) -> Result<()>
Save workspace to disk using WorkspacePersistence
This saves a TeamWorkspace to the filesystem as a Core Workspace.
Sourcepub async fn export_workspace_for_backup(
&self,
team_workspace: &TeamWorkspace,
) -> Result<Value>
pub async fn export_workspace_for_backup( &self, team_workspace: &TeamWorkspace, ) -> Result<Value>
Export workspace for backup
Uses WorkspacePersistence to create a backup-compatible export.
Sourcepub async fn import_workspace_from_backup(
&self,
backup_data: &Value,
owner_id: Uuid,
new_name: Option<String>,
) -> Result<TeamWorkspace>
pub async fn import_workspace_from_backup( &self, backup_data: &Value, owner_id: Uuid, new_name: Option<String>, ) -> Result<TeamWorkspace>
Import workspace from backup
Restores a workspace from a backup JSON value.
Sourcepub fn get_workspace_state_json(
&self,
team_workspace: &TeamWorkspace,
) -> Result<Value>
pub fn get_workspace_state_json( &self, team_workspace: &TeamWorkspace, ) -> Result<Value>
Get workspace state as JSON for sync
Returns the full workspace state as a JSON value for real-time synchronization.
Sourcepub fn update_workspace_state_from_json(
&self,
team_workspace: &mut TeamWorkspace,
state_json: &Value,
) -> Result<()>
pub fn update_workspace_state_from_json( &self, team_workspace: &mut TeamWorkspace, state_json: &Value, ) -> Result<()>
Update workspace state from JSON
Updates the TeamWorkspace with state from a JSON value (from sync).
Sourcepub fn create_empty_workspace(
&self,
name: String,
owner_id: Uuid,
) -> Result<TeamWorkspace>
pub fn create_empty_workspace( &self, name: String, owner_id: Uuid, ) -> Result<TeamWorkspace>
Create a new empty workspace
Creates a new Core Workspace and converts it to a TeamWorkspace.
Auto Trait Implementations§
impl Freeze for CoreBridge
impl RefUnwindSafe for CoreBridge
impl Send for CoreBridge
impl Sync for CoreBridge
impl Unpin for CoreBridge
impl UnwindSafe for CoreBridge
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more