pub struct WorkspaceService { /* private fields */ }Implementations§
Source§impl WorkspaceService
impl WorkspaceService
pub fn new() -> Self
pub fn register(&mut self, path: &Path) -> Result<WorkspaceRoot, WorkspaceError>
pub fn revoke(&mut self, id: &str)
pub fn read( &self, id: &str, path: &str, range: Option<LineRange>, ) -> Result<FileSnapshot, WorkspaceError>
pub fn create_root( &mut self, path: &Path, ) -> Result<WorkspaceRoot, WorkspaceError>
pub fn git_context(&self, id: &str, mode: &str) -> Result<Value, WorkspaceError>
pub fn git_context_with( &self, id: &str, mode: &str, runner: &dyn GitRunner, ) -> Result<Value, WorkspaceError>
pub fn tree( &self, id: &str, path: &str, ) -> Result<Vec<TreeEntry>, WorkspaceError>
pub fn search( &self, id: &str, query: &str, limit: usize, cursor: Option<&str>, ) -> Result<SearchPage, WorkspaceError>
Source§impl WorkspaceService
impl WorkspaceService
pub fn recover( &self, workspace_id: &str, records: &Path, ) -> Result<Vec<RevertResult>, WorkspaceError>
pub fn review( &self, proposal: &EditProposal, ) -> Result<EditReview, WorkspaceError>
pub fn apply( &self, review: EditReview, records: &Path, timestamp: &str, ) -> Result<ApplyResult, WorkspaceError>
pub fn apply_with( &self, review: EditReview, records: &Path, timestamp: &str, before: impl Fn(usize) -> Result<(), WorkspaceError>, ) -> Result<ApplyResult, WorkspaceError>
pub fn revert( &self, id: &str, records: &Path, ) -> Result<RevertResult, WorkspaceError>
Trait Implementations§
Auto Trait Implementations§
impl Forget for WorkspaceService
impl Freeze for WorkspaceService
impl RefUnwindSafe for WorkspaceService
impl Send for WorkspaceService
impl Sync for WorkspaceService
impl Unpin for WorkspaceService
impl UnsafeUnpin for WorkspaceService
impl UnwindSafe for WorkspaceService
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