pub struct SourceRule {
pub pattern: String,
pub decision: Decision,
}Expand description
One rule in the SOURCE (last-match-wins) ordering.
Fields§
§pattern: StringThe pattern text, in this engine’s own tool/tool(subject)/*
syntax (see crate::permissions::rules::RuleSet’s doc comment) —
this module translates the ALGEBRA (evaluation order), not a
foreign harness’s pattern grammar; a caller importing opencode’s own
config format is responsible for first rendering its patterns into
this syntax (see opencode_default_policy for the worked example
this build ships).
decision: DecisionWhat this rule resolves to when it’s the one that matches.
Trait Implementations§
Source§impl Clone for SourceRule
impl Clone for SourceRule
Source§fn clone(&self) -> SourceRule
fn clone(&self) -> SourceRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SourceRule
impl RefUnwindSafe for SourceRule
impl Send for SourceRule
impl Sync for SourceRule
impl Unpin for SourceRule
impl UnsafeUnpin for SourceRule
impl UnwindSafe for SourceRule
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