pub struct DirectoryLocator {
pub base: RelativePath,
}Expand description
Centralized strategy: all sidecars live under a single directory,
mirroring the source tree structure.
With base = ".annotations": src/api.ts → .annotations/src/api.aqm
Fields§
§base: RelativePathDirectory (relative to project root) containing all sidecar files.
Trait Implementations§
Source§impl SidecarLocator for DirectoryLocator
Available on crate feature fs only.
impl SidecarLocator for DirectoryLocator
Available on crate feature
fs only.Source§fn 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.
Source§fn 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).
Auto Trait Implementations§
impl Freeze for DirectoryLocator
impl RefUnwindSafe for DirectoryLocator
impl Send for DirectoryLocator
impl Sync for DirectoryLocator
impl Unpin for DirectoryLocator
impl UnsafeUnpin for DirectoryLocator
impl UnwindSafe for DirectoryLocator
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> 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