pub struct Scanner<'a> { /* private fields */ }Expand description
Runs the rules, with the cache when made by Scanner::new.
Implementations§
Source§impl<'a> Scanner<'a>
impl<'a> Scanner<'a>
Sourcepub fn new(fs: &'a dyn Fs, home: &SurjectionHome) -> Self
pub fn new(fs: &'a dyn Fs, home: &SurjectionHome) -> Self
The scanner installs and updates use: the built-in rules, with a
custom state/scan-rules.toml merged in (it may add rules or
raise severities only; one that does not load is a warning),
results cached in cache/scan.
pub fn rules(&self) -> &Rules
Sourcepub fn scan_files(&self, files: &SkillFiles) -> ScanReport
pub fn scan_files(&self, files: &SkillFiles) -> ScanReport
Scans files (a skill folder, a repository’s files) by relative
/-separated path.
Sourcepub fn scan_command(&self, command: &str, args: &[String]) -> ScanReport
pub fn scan_command(&self, command: &str, args: &[String]) -> ScanReport
Scans an MCP server’s command line: command and args joined by
spaces, as the command rules expect.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Scanner<'a>
impl<'a> !UnwindSafe for Scanner<'a>
impl<'a> Forget for Scanner<'a>
impl<'a> Freeze for Scanner<'a>
impl<'a> Move for Scanner<'a>
impl<'a> Send for Scanner<'a>
impl<'a> Sync for Scanner<'a>
impl<'a> Unpin for Scanner<'a>
impl<'a> UnsafeUnpin for Scanner<'a>where
&'static Rules: UnsafeUnpin,
Rules: UnsafeUnpin,
&'a dyn Fs: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
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