pub struct Rule {
pub name: String,
pub description: Option<String>,
pub paths: Vec<String>,
pub body: String,
pub path: PathBuf,
pub scope: RuleScope,
}Expand description
A loaded rule file (frontmatter parsed; body raw).
Fields§
§name: StringLogical name (kebab-case, defaults to the file stem).
description: Option<String>Optional one-line description.
paths: Vec<String>Optional glob patterns for lazy activation. When empty, the rule is always active (loaded at startup).
body: StringFile body (everything after the closing ---).
path: PathBufAbsolute path on disk.
scope: RuleScopeSource scope (project vs user).
Trait Implementations§
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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> 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.