pub struct WorktreeManager<'a> { /* private fields */ }Expand description
Manages worktree creation for resolved dependency versions.
Implementations§
Source§impl<'a> WorktreeManager<'a>
impl<'a> WorktreeManager<'a>
Sourcepub fn new(
cache: &'a Cache,
source_manager: &'a SourceManager,
version_resolver: &'a VersionResolver,
) -> Self
pub fn new( cache: &'a Cache, source_manager: &'a SourceManager, version_resolver: &'a VersionResolver, ) -> Self
Create a new worktree manager.
Sourcepub fn group_key(source: &str, version: &str) -> String
pub fn group_key(source: &str, version: &str) -> String
Create a group key for identifying source-version combinations.
Sourcepub async fn create_worktrees_for_resolved_versions(
&self,
) -> Result<HashMap<String, PreparedSourceVersion>>
pub async fn create_worktrees_for_resolved_versions( &self, ) -> Result<HashMap<String, PreparedSourceVersion>>
Create worktrees for all resolved versions in parallel.
This function takes the resolved versions from the VersionResolver and creates Git worktrees for each unique commit SHA, enabling efficient parallel access to dependency resources.
§Returns
A map of group keys to prepared source versions containing worktree paths.
Auto Trait Implementations§
impl<'a> Freeze for WorktreeManager<'a>
impl<'a> !RefUnwindSafe for WorktreeManager<'a>
impl<'a> Send for WorktreeManager<'a>
impl<'a> Sync for WorktreeManager<'a>
impl<'a> Unpin for WorktreeManager<'a>
impl<'a> !UnwindSafe for WorktreeManager<'a>
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