pub trait LookupStrategy:
Clone
+ Send
+ Sync {
// Required methods
fn config_subdir(&self) -> &'static str;
fn matches_entry(&self, path: &Path) -> bool;
fn find_by_name(&self, dir: &Path, name: &str) -> Option<PathBuf>;
}Expand description
Trait for defining file lookup strategies.
Different item types may have different file naming conventions.
For example, skills use SKILL.md in subdirectories or *.skill.md,
while subagents use simple *.md files.
Required Methods§
Sourcefn config_subdir(&self) -> &'static str
fn config_subdir(&self) -> &'static str
Get the subdirectory name within .claude/ for this item type.
e.g., “skills” or “agents”
Sourcefn matches_entry(&self, path: &Path) -> bool
fn matches_entry(&self, path: &Path) -> bool
Check if a directory entry matches the lookup pattern.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.