pub trait SidecarLocator: Send + Sync {
// Required methods
fn discover(
&self,
project_root: &ProjectRoot,
) -> Vec<(PathBuf, RelativePath)>;
fn sidecar_for(&self, source: &RelativePath) -> RelativePath;
}Expand description
Strategy for locating .aqm sidecar files relative to source files.
Not sealed — plugins and users can implement custom locators.
Required Methods§
Sourcefn discover(&self, project_root: &ProjectRoot) -> Vec<(PathBuf, RelativePath)>
fn discover(&self, project_root: &ProjectRoot) -> Vec<(PathBuf, RelativePath)>
Discover all sidecar files and their corresponding source-relative paths.
Sourcefn sidecar_for(&self, source: &RelativePath) -> RelativePath
fn sidecar_for(&self, source: &RelativePath) -> RelativePath
Given a source-relative path, return the sidecar file path (relative to project root).
Implementors§
impl SidecarLocator for ColocatedLocator
Available on crate feature
fs only.impl SidecarLocator for DirectoryLocator
Available on crate feature
fs only.