pub struct Scanner { /* private fields */ }Expand description
Embedded consumers identify candidates independently of redacted display labels. Embedded consumers identify candidates independently of redacted display labels. Embedded consumers identify candidates independently of redacted display labels. One loaded ruleset reused across candidate snapshots.
Embedding hosts must use panic=unwind and configure payload-free panic output before spawning workers. The library catches load/matcher unwinds but deliberately does not replace process-wide hooks; Rust invokes the host’s hook before an unwind can be caught.
Implementations§
Source§impl Scanner
Load once and scan exact snapshots without reading candidate files from the live worktree.
impl Scanner
Load once and scan exact snapshots without reading candidate files from the live worktree.
Sourcepub fn load(
runtime_rules_path: &Path,
builtin_rules: bool,
explicit: bool,
) -> Result<Scanner>
pub fn load( runtime_rules_path: &Path, builtin_rules: bool, explicit: bool, ) -> Result<Scanner>
What: Load runtime rules and the optional shipped baseline through the incumbent cache/validation path. Why: The embedding adapter does not create a second compiler, cache or builtin-rules loader.
In TS you’d write (pseudocode):
function loadScanner(runtimeRulesPath, builtinRules, explicitlySelectedPath): Scanner;Sourcepub fn cache_warnings(&self) -> &[CacheWarning]
pub fn cache_warnings(&self) -> &[CacheWarning]
Borrow fixed-token cache warnings without recovering their fields from serialized terminal text.
Sourcepub fn scan(
&self,
identity: usize,
logical_path: &Path,
bytes: &[u8],
) -> CandidateScan
pub fn scan( &self, identity: usize, logical_path: &Path, bytes: &[u8], ) -> CandidateScan
What: Scan a candidate’s logical pathname and exact immutable bytes. Why: Historical/index candidates must never substitute the current worktree file or its temporary materialization name.
In TS you’d write (pseudocode):
function scan(identity, logicalPath, exactBytes): CandidateScan;Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnsafeUnpin for Scanner
impl UnwindSafe for Scanner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more