pub enum AuthorityPattern {
Path(&'static [&'static str]),
MethodWithContext {
method: &'static str,
requires_path: &'static [&'static str],
},
}Expand description
How an Authority matches against parsed call sites.
There are two matching strategies, reflecting the two kinds of calls in Rust:
- Path matching catches qualified calls like
std::fs::read(...)orFile::open(...) - Contextual method matching catches method calls like
.output()or.spawn(), but only when a related path call (likeCommand::new) appears in the same function. This eliminates false positives from common method names.
Variants§
Path(&'static [&'static str])
Match a fully qualified path by suffix.
The call’s expanded path must end with these segments. For example,
&["std", "fs", "read"] matches both std::fs::read(...) and a bare read(...)
that was imported via use std::fs::read.
MethodWithContext
Match a method call, but only if the same function also contains a call
matching requires_path.
This is the co-occurrence heuristic that prevents .status() on an HTTP response
from being flagged as subprocess execution. The method only fires when the
required context (e.g., Command::new) is present in the same function body.
Trait Implementations§
Source§impl Clone for AuthorityPattern
impl Clone for AuthorityPattern
Source§fn clone(&self) -> AuthorityPattern
fn clone(&self) -> AuthorityPattern
Returns a duplicate of the value. Read more
1.0.0 · 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 AuthorityPattern
impl RefUnwindSafe for AuthorityPattern
impl Send for AuthorityPattern
impl Sync for AuthorityPattern
impl Unpin for AuthorityPattern
impl UnsafeUnpin for AuthorityPattern
impl UnwindSafe for AuthorityPattern
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