pub trait Git: Sync {
// Required methods
fn validate_branch(
&self,
root: &Path,
task: &str,
control: &Control,
) -> impl Future<Output = Result<(), Problem>> + Send;
fn inspect(
&self,
path: &Path,
remote: Option<&str>,
control: &Control,
) -> impl Future<Output = Result<Repository, Problem>> + Send;
fn revalidate(
&self,
repository: &Repository,
control: &Control,
) -> impl Future<Output = Result<(), Problem>> + Send;
fn plan(
&self,
repository: &Repository,
task: &str,
checkout: bool,
from: Option<&str>,
resolution: SourceResolution,
control: &Control,
) -> impl Future<Output = Result<BranchPlan, Problem>> + Send;
fn fetch(
&self,
repository: &Repository,
control: &Control,
) -> impl Future<Output = Result<(), Problem>> + Send;
fn add(
&self,
repository: &Repository,
task: &str,
destination: &Path,
plan: &BranchPlan,
control: &Control,
) -> impl Future<Output = Result<(), Problem>> + Send;
// Provided method
fn worktree_identity(
&self,
_path: &Path,
) -> impl Future<Output = Result<Option<String>, Problem>> + Send { ... }
}Expand description
Operations used to validate repository identity, resolve branches and establish worktrees.
Required Methods§
Sourcefn validate_branch(
&self,
root: &Path,
task: &str,
control: &Control,
) -> impl Future<Output = Result<(), Problem>> + Send
fn validate_branch( &self, root: &Path, task: &str, control: &Control, ) -> impl Future<Output = Result<(), Problem>> + Send
Ask Git to validate the task’s proposed branch name.
Sourcefn inspect(
&self,
path: &Path,
remote: Option<&str>,
control: &Control,
) -> impl Future<Output = Result<Repository, Problem>> + Send
fn inspect( &self, path: &Path, remote: Option<&str>, control: &Control, ) -> impl Future<Output = Result<Repository, Problem>> + Send
Resolve the backing repository, its identity and the selected remote.
Sourcefn revalidate(
&self,
repository: &Repository,
control: &Control,
) -> impl Future<Output = Result<(), Problem>> + Send
fn revalidate( &self, repository: &Repository, control: &Control, ) -> impl Future<Output = Result<(), Problem>> + Send
Check the repository against its earlier identity before proceeding.
Sourcefn plan(
&self,
repository: &Repository,
task: &str,
checkout: bool,
from: Option<&str>,
resolution: SourceResolution,
control: &Control,
) -> impl Future<Output = Result<BranchPlan, Problem>> + Send
fn plan( &self, repository: &Repository, task: &str, checkout: bool, from: Option<&str>, resolution: SourceResolution, control: &Control, ) -> impl Future<Output = Result<BranchPlan, Problem>> + Send
Resolve reuse, tracking or creation of the task branch.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".