pub struct CloneManager<G: GitOperations> { /* private fields */ }Expand description
Manages parallel clone operations.
Implementations§
Source§impl<G: GitOperations + 'static> CloneManager<G>
impl<G: GitOperations + 'static> CloneManager<G>
Sourcepub fn new(git: G, options: CloneManagerOptions) -> Self
pub fn new(git: G, options: CloneManagerOptions) -> Self
Creates a new clone manager.
Sourcepub fn compute_path(
&self,
base_path: &Path,
repo: &OwnedRepo,
provider: &str,
) -> PathBuf
pub fn compute_path( &self, base_path: &Path, repo: &OwnedRepo, provider: &str, ) -> PathBuf
Computes the local path for a repository.
Sourcepub fn get_clone_url<'a>(&self, repo: &'a OwnedRepo) -> &'a str
pub fn get_clone_url<'a>(&self, repo: &'a OwnedRepo) -> &'a str
Gets the clone URL for a repository.
Sourcepub async fn clone_repos(
&self,
base_path: &Path,
repos: Vec<OwnedRepo>,
provider: &str,
progress: Arc<dyn CloneProgress>,
) -> (OpSummary, Vec<CloneResult>)
pub async fn clone_repos( &self, base_path: &Path, repos: Vec<OwnedRepo>, provider: &str, progress: Arc<dyn CloneProgress>, ) -> (OpSummary, Vec<CloneResult>)
Clones repositories in parallel.
Returns a summary of operations and individual results.
Sourcepub fn clone_single(
&self,
base_path: &Path,
repo: &OwnedRepo,
provider: &str,
) -> CloneResult
pub fn clone_single( &self, base_path: &Path, repo: &OwnedRepo, provider: &str, ) -> CloneResult
Clones a single repository synchronously.
Auto Trait Implementations§
impl<G> Freeze for CloneManager<G>
impl<G> RefUnwindSafe for CloneManager<G>where
G: RefUnwindSafe,
impl<G> Send for CloneManager<G>
impl<G> Sync for CloneManager<G>
impl<G> Unpin for CloneManager<G>
impl<G> UnsafeUnpin for CloneManager<G>
impl<G> UnwindSafe for CloneManager<G>where
G: RefUnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more