pub struct RuleFile {
pub name: String,
pub path: PathBuf,
pub paths: Vec<String>,
pub body: String,
}Expand description
One .claude/rules/*.md file.
Fields§
§name: StringFrontmatter name, else the file stem.
path: PathBufThe file itself.
paths: Vec<String>paths: frontmatter globs. Empty = unscoped (always loaded).
body: StringEverything after the frontmatter, trimmed and capped.
Implementations§
Source§impl RuleFile
impl RuleFile
Sourcepub fn matches(&self, touched: &Path, root: &Path) -> bool
pub fn matches(&self, touched: &Path, root: &Path) -> bool
Does this rule’s selector match touched? Each glob is tried
against the path relative to root, the full path, and the bare
file name — the same three spellings instruction-file excludes are
matched in (agent::instruction_file_excluded), so one glob
spelling means one thing across the product.
Trait Implementations§
impl Eq for RuleFile
impl StructuralPartialEq for RuleFile
Auto Trait Implementations§
impl Freeze for RuleFile
impl RefUnwindSafe for RuleFile
impl Send for RuleFile
impl Sync for RuleFile
impl Unpin for RuleFile
impl UnsafeUnpin for RuleFile
impl UnwindSafe for RuleFile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.