pub struct Scan { /* private fields */ }Expand description
Package dependency scanner.
Implementations§
Source§impl Scan
impl Scan
pub fn new(config: &Config) -> Scan
pub fn add(&mut self, pkgpath: &PkgPath)
Sourcepub fn is_full_tree(&self) -> bool
pub fn is_full_tree(&self) -> bool
Returns true if this is a full tree scan.
Sourcepub fn set_full_scan_complete(&mut self)
pub fn set_full_scan_complete(&mut self)
Mark that a previous full tree scan completed successfully.
Sourcepub fn init_from_db(&mut self, db: &Database) -> Result<(usize, usize)>
pub fn init_from_db(&mut self, db: &Database) -> Result<(usize, usize)>
Initialize scan from database, checking what’s already scanned. Returns (cached_count, pending_deps_count) where pending_deps_count is the number of dependencies discovered but not yet scanned (from interrupted scans).
pub fn start(&mut self, ctx: &RunContext, db: &Database) -> Result<bool>
Sourcepub fn scan_errors(&self) -> impl Iterator<Item = &str>
pub fn scan_errors(&self) -> impl Iterator<Item = &str>
Returns scan failures as formatted error strings.
Sourcepub fn resolve(&mut self, db: &Database) -> Result<ScanSummary>
pub fn resolve(&mut self, db: &Database) -> Result<ScanSummary>
Resolve the list of scanned packages, matching dependency patterns to specific packages and verifying no circular dependencies exist.
Returns a ScanSummary containing all packages with their outcomes.
Also stores resolved dependencies in the database for fast reverse lookups.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scan
impl !RefUnwindSafe for Scan
impl Send for Scan
impl Sync for Scan
impl Unpin for Scan
impl !UnwindSafe for Scan
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> 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>
Converts
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>
Converts
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