pub struct ScanProgress {
pub directories_scanned: AtomicUsize,
pub projects_found: AtomicUsize,
pub total_size_found: AtomicU64,
pub current_path: Mutex<PathBuf>,
pub errors: Mutex<Vec<ScanError>>,
pub is_complete: AtomicBool,
pub is_cancelled: AtomicBool,
}Expand description
Real-time scan progress information
Fields§
§directories_scanned: AtomicUsizeNumber of directories scanned
projects_found: AtomicUsizeNumber of projects found
total_size_found: AtomicU64Total cleanable size found so far
current_path: Mutex<PathBuf>Currently scanning path
errors: Mutex<Vec<ScanError>>Errors encountered during scan
is_complete: AtomicBoolWhether scan is complete
is_cancelled: AtomicBoolWhether scan was cancelled
Implementations§
Source§impl ScanProgress
impl ScanProgress
Sourcepub fn inc_directories(&self)
pub fn inc_directories(&self)
Increment directories scanned
Sourcepub fn inc_projects(&self)
pub fn inc_projects(&self)
Increment projects found
Sourcepub fn set_current_path(&self, path: PathBuf)
pub fn set_current_path(&self, path: PathBuf)
Update current path
Sourcepub fn mark_complete(&self)
pub fn mark_complete(&self)
Mark as complete
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if cancelled
Sourcepub fn snapshot(&self) -> ProgressSnapshot
pub fn snapshot(&self) -> ProgressSnapshot
Get snapshot of current progress
Trait Implementations§
Source§impl Debug for ScanProgress
impl Debug for ScanProgress
Source§impl Default for ScanProgress
impl Default for ScanProgress
Source§fn default() -> ScanProgress
fn default() -> ScanProgress
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ScanProgress
impl !RefUnwindSafe for ScanProgress
impl Send for ScanProgress
impl Sync for ScanProgress
impl Unpin for ScanProgress
impl UnwindSafe for ScanProgress
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> 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