pub struct RuleContext<'a> {
pub graph: &'a EnrichedGraph,
pub options: Option<&'a Value>,
}Expand description
Context passed to every rule. Rules are pure functions over the enriched graph — no filesystem access, no config, no lockfile.
See docs/rules for details.
Fields§
§graph: &'a EnrichedGraph§options: Option<&'a Value>Per-rule options from [rules.<name>.options]. drft passes through, rules interpret.
Auto Trait Implementations§
impl<'a> Freeze for RuleContext<'a>
impl<'a> RefUnwindSafe for RuleContext<'a>
impl<'a> Send for RuleContext<'a>
impl<'a> Sync for RuleContext<'a>
impl<'a> Unpin for RuleContext<'a>
impl<'a> UnsafeUnpin for RuleContext<'a>
impl<'a> UnwindSafe for RuleContext<'a>
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