pub trait WorkspaceGit: Send + Sync {
// Required methods
fn is_repository<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn log<'life0, 'async_trait>(
&'life0 self,
max_count: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitCommit>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_branches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitBranch>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_branch<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitCreateBranchRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn checkout<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitCheckoutRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitCheckoutOutput>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn diff<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitDiffRequest,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_remotes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitRemote>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Core Git operations supported by virtually every workspace Git backend.
Optional features (stash, worktrees) live in separate traits so backends
like browser-side isomorphic-git can implement only what they support
instead of returning runtime “unsupported” errors.
Required Methods§
fn is_repository<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log<'life0, 'async_trait>(
&'life0 self,
max_count: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitCommit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_branches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitBranch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_branch<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitCreateBranchRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn checkout<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitCheckoutRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitCheckoutOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn diff<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitDiffRequest,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_remotes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitRemote>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".