RootResolver

Trait RootResolver 

Source
pub trait RootResolver {
    // Required method
    fn resolve_package_root(&self, pkg: &PackageSpec) -> FileResult<ImmutPath>;

    // Provided methods
    fn path_for_id(&self, file_id: FileId) -> FileResult<PathResolution> { ... }
    fn resolve_root(&self, file_id: FileId) -> FileResult<Option<ImmutPath>> { ... }
}
Expand description

Trait for resolving file paths and roots for different types of files.

Required Methods§

Source

fn resolve_package_root(&self, pkg: &PackageSpec) -> FileResult<ImmutPath>

Resolves the root path for a given package specification.

Provided Methods§

Source

fn path_for_id(&self, file_id: FileId) -> FileResult<PathResolution>

Resolves a file ID to its corresponding path resolution.

Source

fn resolve_root(&self, file_id: FileId) -> FileResult<Option<ImmutPath>>

Resolves the root path for a given file ID.

Implementors§