pub struct ToolRuleMap { /* private fields */ }Expand description
Tool rules keyed by tool name, in the order the author wrote them.
Two spellings of one key (Bash beside bash, or bash(git push:*) beside
bash(git push *)) are one key: a table that holds both fails to load, since file order
would otherwise pick the winner.
Implementations§
Source§impl ToolRuleMap
impl ToolRuleMap
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = (&OverlayToolName, ToolAction)>
Sourcepub fn wildcard_refusal(&self, table: &str, reason: &str) -> Option<String>
pub fn wildcard_refusal(&self, table: &str, reason: &str) -> Option<String>
The message that refuses a * rule in table, where it was written: * is one agent’s
default, so only a table that speaks for one agent may set it. reason says why this
table cannot.
pub fn contains_key(&self, key: &ParsedToolName) -> bool
Sourcepub fn merge_by_key(lower: &Self, higher: &Self) -> Self
pub fn merge_by_key(lower: &Self, higher: &Self) -> Self
lower with every key that higher names replaced by higher’s entry, then the rest
of higher. Keys compare by their parsed form, and higher’s spelling is the one kept.
Trait Implementations§
Source§impl Clone for ToolRuleMap
impl Clone for ToolRuleMap
Source§impl Debug for ToolRuleMap
impl Debug for ToolRuleMap
Source§impl Default for ToolRuleMap
impl Default for ToolRuleMap
Source§impl<'de> Deserialize<'de> for ToolRuleMap
impl<'de> Deserialize<'de> for ToolRuleMap
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ToolRuleMap
Source§impl PartialEq for ToolRuleMap
impl PartialEq for ToolRuleMap
Source§impl Serialize for ToolRuleMap
impl Serialize for ToolRuleMap
impl StructuralPartialEq for ToolRuleMap
Auto Trait Implementations§
impl Forget for ToolRuleMap
impl Freeze for ToolRuleMap
impl Move for ToolRuleMap
impl RefUnwindSafe for ToolRuleMap
impl Send for ToolRuleMap
impl Sync for ToolRuleMap
impl Unpin for ToolRuleMap
impl UnsafeUnpin for ToolRuleMap
impl UnwindSafe for ToolRuleMap
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.