pub trait VcsProvider:
Send
+ Sync
+ 'static {
Show 15 methods
// Required methods
fn id(&self) -> VcsProviderId;
fn display_name(&self) -> String;
fn detect<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace_root: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Option<VcsDetectionClaim>, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn status<'life0, 'async_trait>(
&'life0 self,
request: VcsStatusRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsStatus, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_changes<'life0, 'async_trait>(
&'life0 self,
request: VcsListChangesRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<VcsChangedFile>, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_changed_content<'life0, 'async_trait>(
&'life0 self,
request: VcsReadChangedContentRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsChangedContentPage, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn list_files<'life0, 'async_trait>(
&'life0 self,
request: VcsListFilesRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsFileListing, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn status_with_changes<'life0, 'async_trait>(
&'life0 self,
request: VcsListChangesRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsStatusWithChanges, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn list_changes_against_base<'life0, 'async_trait>(
&'life0 self,
request: VcsListChangesRequest,
_base: Option<VcsBase>,
) -> Pin<Box<dyn Future<Output = Result<Vec<VcsChangedFile>, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn select<'life0, 'async_trait>(
&'life0 self,
request: VcsSelectionRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn create_snapshot<'life0, 'async_trait>(
&'life0 self,
_request: VcsSnapshotCreateRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsSnapshot, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn restore<'life0, 'async_trait>(
&'life0 self,
_request: VcsRestoreRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn list_lines<'life0, 'async_trait>(
&'life0 self,
workspace_root: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<Vec<VcsLineOfWork>, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn switch_line<'life0, 'async_trait>(
&'life0 self,
_request: VcsLineSwitchRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn sync<'life0, 'async_trait>(
&'life0 self,
request: VcsSyncRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn id(&self) -> VcsProviderId
fn display_name(&self) -> String
fn detect<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace_root: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Option<VcsDetectionClaim>, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
request: VcsStatusRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsStatus, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_changes<'life0, 'async_trait>(
&'life0 self,
request: VcsListChangesRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<VcsChangedFile>, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_changed_content<'life0, 'async_trait>(
&'life0 self,
request: VcsReadChangedContentRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsChangedContentPage, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn list_files<'life0, 'async_trait>(
&'life0 self,
request: VcsListFilesRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsFileListing, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_files<'life0, 'async_trait>(
&'life0 self,
request: VcsListFilesRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsFileListing, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Enumerate every file under workspace_root that the provider tracks or
treats as non-ignored. Providers that cannot enumerate the workspace
return VcsError::UnsupportedOperation so callers can fall back to a
plain filesystem walk. The default implementation is unsupported.
fn status_with_changes<'life0, 'async_trait>(
&'life0 self,
request: VcsListChangesRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsStatusWithChanges, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_changes_against_base<'life0, 'async_trait>(
&'life0 self,
request: VcsListChangesRequest,
_base: Option<VcsBase>,
) -> Pin<Box<dyn Future<Output = Result<Vec<VcsChangedFile>, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn select<'life0, 'async_trait>(
&'life0 self,
request: VcsSelectionRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_snapshot<'life0, 'async_trait>(
&'life0 self,
_request: VcsSnapshotCreateRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsSnapshot, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restore<'life0, 'async_trait>(
&'life0 self,
_request: VcsRestoreRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_lines<'life0, 'async_trait>(
&'life0 self,
workspace_root: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<Vec<VcsLineOfWork>, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn switch_line<'life0, 'async_trait>(
&'life0 self,
_request: VcsLineSwitchRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync<'life0, 'async_trait>(
&'life0 self,
request: VcsSyncRequest,
) -> Pin<Box<dyn Future<Output = Result<VcsOperationResult, VcsError>> + 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".