pub struct ResourceFetchingService;Expand description
Service for fetching resource content and resolving paths.
Implementations§
Source§impl ResourceFetchingService
impl ResourceFetchingService
Sourcepub async fn fetch_content(
core: &ResolutionCore,
dep: &ResourceDependency,
version_service: &mut VersionResolutionService,
) -> Result<String>
pub async fn fetch_content( core: &ResolutionCore, dep: &ResourceDependency, version_service: &mut VersionResolutionService, ) -> Result<String>
Fetch the content of a resource for metadata extraction.
This method retrieves the file content from either:
- Local filesystem (for path-only dependencies)
- Git worktree (for Git-backed dependencies with version)
This method can prepare versions on-demand if they haven’t been prepared yet, which is necessary for transitive dependencies discovered during resolution.
§Arguments
core- The resolution core with manifest and cachedep- The resource dependency to fetchversion_service- Version service to get/prepare worktree paths
§Returns
The file content as a string
Sourcepub async fn get_canonical_path(
core: &ResolutionCore,
dep: &ResourceDependency,
version_service: &mut VersionResolutionService,
) -> Result<PathBuf>
pub async fn get_canonical_path( core: &ResolutionCore, dep: &ResourceDependency, version_service: &mut VersionResolutionService, ) -> Result<PathBuf>
Get the canonical path for a dependency.
Resolves dependency path to its canonical form on the filesystem. Can prepare versions on-demand if needed.
§Arguments
core- The resolution core with manifest and cachedep- The resource dependencyversion_service- Version service to get/prepare worktree paths
§Returns
The canonical absolute path to the resource
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResourceFetchingService
impl RefUnwindSafe for ResourceFetchingService
impl Send for ResourceFetchingService
impl Sync for ResourceFetchingService
impl Unpin for ResourceFetchingService
impl UnwindSafe for ResourceFetchingService
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