pub struct DesignRule {
pub id: &'static str,
pub title: &'static str,
pub rationale: &'static str,
pub intents: &'static [&'static str],
pub check: fn(&Spec, Option<&str>) -> Vec<Finding>,
}Expand description
A single entry in the static rule registry. All fields are 'static
for zero-cost iteration and Phase 253 MCP/doc derivation.
Fields§
§id: &'static strStable rule id used in allow lists and finding rule fields.
title: &'static strShort human title for docs/MCP catalog.
rationale: &'static strWhy this rule exists (one sentence).
intents: &'static [&'static str]Intents this rule applies to. Empty slice = all intents.
check: fn(&Spec, Option<&str>) -> Vec<Finding>Pure check function. Receives the raw Spec and the resolved intent
(may be None when intent is completely undeclared and inference found
no signal). Returns zero or more findings.
Auto Trait Implementations§
impl Freeze for DesignRule
impl RefUnwindSafe for DesignRule
impl Send for DesignRule
impl Sync for DesignRule
impl Unpin for DesignRule
impl UnsafeUnpin for DesignRule
impl UnwindSafe for DesignRule
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