Skip to main content

SidecarLocator

Trait SidecarLocator 

Source
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§

Source

fn discover(&self, project_root: &ProjectRoot) -> Vec<(PathBuf, RelativePath)>

Discover all sidecar files and their corresponding source-relative paths.

Source

fn sidecar_for(&self, source: &RelativePath) -> RelativePath

Given a source-relative path, return the sidecar file path (relative to project root).

Implementors§

Source§

impl SidecarLocator for ColocatedLocator

Available on crate feature fs only.
Source§

impl SidecarLocator for DirectoryLocator

Available on crate feature fs only.