pub struct SessionRpcWorkspaces<'a> { /* private fields */ }Expand description
session.workspaces.* RPCs.
Implementations§
Source§impl<'a> SessionRpcWorkspaces<'a>
impl<'a> SessionRpcWorkspaces<'a>
Sourcepub async fn get_workspace(&self) -> Result<WorkspacesGetWorkspaceResult, Error>
pub async fn get_workspace(&self) -> Result<WorkspacesGetWorkspaceResult, Error>
Gets current workspace metadata for the session.
Wire method: session.workspaces.getWorkspace.
§Returns
Current workspace metadata for the session, including its absolute filesystem path when available.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn list_files(&self) -> Result<WorkspacesListFilesResult, Error>
pub async fn list_files(&self) -> Result<WorkspacesListFilesResult, Error>
Lists files stored in the session workspace files directory.
Wire method: session.workspaces.listFiles.
§Returns
Relative paths of files stored in the session workspace files directory.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn read_file(
&self,
params: WorkspacesReadFileRequest,
) -> Result<WorkspacesReadFileResult, Error>
pub async fn read_file( &self, params: WorkspacesReadFileRequest, ) -> Result<WorkspacesReadFileResult, Error>
Reads a file from the session workspace files directory.
Wire method: session.workspaces.readFile.
§Parameters
params- Relative path of the workspace file to read.
§Returns
Contents of the requested workspace file as a UTF-8 string.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn create_file(
&self,
params: WorkspacesCreateFileRequest,
) -> Result<(), Error>
pub async fn create_file( &self, params: WorkspacesCreateFileRequest, ) -> Result<(), Error>
Creates or overwrites a file in the session workspace files directory.
Wire method: session.workspaces.createFile.
§Parameters
params- Relative path and UTF-8 content for the workspace file to create or overwrite.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn list_checkpoints(
&self,
) -> Result<WorkspacesListCheckpointsResult, Error>
pub async fn list_checkpoints( &self, ) -> Result<WorkspacesListCheckpointsResult, Error>
Lists workspace checkpoints in chronological order.
Wire method: session.workspaces.listCheckpoints.
§Returns
Workspace checkpoints in chronological order; empty when the workspace is not enabled.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn read_checkpoint(
&self,
params: WorkspacesReadCheckpointRequest,
) -> Result<WorkspacesReadCheckpointResult, Error>
pub async fn read_checkpoint( &self, params: WorkspacesReadCheckpointRequest, ) -> Result<WorkspacesReadCheckpointResult, Error>
Reads the content of a workspace checkpoint by number.
Wire method: session.workspaces.readCheckpoint.
§Parameters
params- Checkpoint number to read.
§Returns
Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn save_large_paste(
&self,
params: WorkspacesSaveLargePasteRequest,
) -> Result<WorkspacesSaveLargePasteResult, Error>
pub async fn save_large_paste( &self, params: WorkspacesSaveLargePasteRequest, ) -> Result<WorkspacesSaveLargePasteResult, Error>
Saves pasted content as a UTF-8 file in the session workspace.
Wire method: session.workspaces.saveLargePaste.
§Parameters
params- Pasted content to save as a UTF-8 file in the session workspace.
§Returns
Descriptor for the saved paste file, or null when the workspace is unavailable.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcWorkspaces<'a>
impl<'a> Clone for SessionRpcWorkspaces<'a>
Source§fn clone(&self) -> SessionRpcWorkspaces<'a>
fn clone(&self) -> SessionRpcWorkspaces<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more