pub struct StateWorkspace { /* private fields */ }Implementations§
Source§impl StateWorkspace
impl StateWorkspace
pub async fn plan_edits( &self, edits: Vec<FileEdit>, ) -> Result<EditPlanResult, ToolError>
pub async fn apply_edit_plan( &self, plan_id: &str, ) -> Result<ApplyEditPlanResult, ToolError>
Source§impl StateWorkspace
impl StateWorkspace
pub async fn write_file( &self, path: &VirtualPath, content: &str, ) -> Result<(), ToolError>
pub async fn read_file( &self, path: &VirtualPath, ) -> Result<ReadFileResult, ToolError>
pub async fn append_file( &self, path: &VirtualPath, content: &str, ) -> Result<MutationResult, ToolError>
pub async fn read_json( &self, path: &VirtualPath, ) -> Result<JsonReadResult, ToolError>
pub async fn write_json( &self, path: &VirtualPath, value: &Value, pretty: bool, ) -> Result<(), ToolError>
pub async fn hash_file( &self, path: &VirtualPath, algorithm: &str, ) -> Result<HashFileResult, ToolError>
pub async fn detect_file( &self, path: &VirtualPath, ) -> Result<DetectFileResult, ToolError>
Source§impl StateWorkspace
impl StateWorkspace
pub async fn exists( &self, path: &VirtualPath, ) -> Result<ExistsResult, ToolError>
pub async fn stat(&self, path: &VirtualPath) -> Result<StatResult, ToolError>
pub async fn mkdir( &self, path: &VirtualPath, ) -> Result<MutationResult, ToolError>
pub async fn remove( &self, path: &VirtualPath, recursive: bool, ) -> Result<MutationResult, ToolError>
pub async fn copy( &self, from: &VirtualPath, to: &VirtualPath, ) -> Result<MutationResult, ToolError>
pub async fn move_path( &self, from: &VirtualPath, to: &VirtualPath, ) -> Result<MutationResult, ToolError>
pub async fn walk_tree( &self, path: &VirtualPath, limit: usize, ) -> Result<WalkTreeResult, ToolError>
pub async fn list(&self, path: &VirtualPath) -> Result<ListResult, ToolError>
pub async fn glob( &self, pattern: &str, limit: usize, ) -> Result<GlobResult, ToolError>
pub async fn search_files( &self, pattern: &str, query: &str, limit: usize, ) -> Result<SearchFilesResult, ToolError>
pub async fn replace_in_files( &self, pattern: &str, search: &str, replace: &str, dry_run: bool, ) -> Result<ReplaceInFilesResult, ToolError>
Trait Implementations§
Source§impl Clone for StateWorkspace
impl Clone for StateWorkspace
Source§fn clone(&self) -> StateWorkspace
fn clone(&self) -> StateWorkspace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StateWorkspace
impl RefUnwindSafe for StateWorkspace
impl Send for StateWorkspace
impl Sync for StateWorkspace
impl Unpin for StateWorkspace
impl UnsafeUnpin for StateWorkspace
impl UnwindSafe for StateWorkspace
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