pub struct Scanner { /* private fields */ }Expand description
Parallel directory scanner
Implementations§
Source§impl Scanner
impl Scanner
pub fn with_pool( root: PathBuf, pool: Arc<ThreadPool>, config: Arc<Config>, ) -> Self
Sourcepub fn scan(&self, tx: Sender<ScanResult>) -> ScanSummary
pub fn scan(&self, tx: Sender<ScanResult>) -> ScanSummary
Scan directory and send matching paths to channel Returns total number of entries scanned
pub fn scan_with_cancel( &self, tx: Sender<ScanResult>, cancelled: &AtomicBool, ) -> ScanSummary
Auto Trait Implementations§
impl !RefUnwindSafe for Scanner
impl !UnwindSafe for Scanner
impl Freeze for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnsafeUnpin 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
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