pub enum ScanProgress<'a> {
Discovered {
found: u64,
},
Walked {
total: u64,
},
Ingested {
done: u64,
total: u64,
path: &'a str,
},
}Expand description
A progress event emitted during a scan or revalidate. Borrows the current
path to avoid a per-file allocation in the writer; the saved allocation is
negligible next to the existing per-file to_string_lossy + DB write, so do
not contort the API to preserve the borrow.
Variants§
Discovered
A supported-audio file was found during the walk; found is the running
count of collected files.
Walked
The walk (and, for revalidate, the skip-unchanged pass) finished;
total files will be ingested and tracked by the determinate bar.
Ingested
A file was committed. done runs 1..=total; path is its absolute path.
Trait Implementations§
Source§impl<'a> Clone for ScanProgress<'a>
impl<'a> Clone for ScanProgress<'a>
Source§fn clone(&self) -> ScanProgress<'a>
fn clone(&self) -> ScanProgress<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ScanProgress<'a>
Auto Trait Implementations§
impl<'a> Freeze for ScanProgress<'a>
impl<'a> RefUnwindSafe for ScanProgress<'a>
impl<'a> Send for ScanProgress<'a>
impl<'a> Sync for ScanProgress<'a>
impl<'a> Unpin for ScanProgress<'a>
impl<'a> UnsafeUnpin for ScanProgress<'a>
impl<'a> UnwindSafe for ScanProgress<'a>
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