pub enum DirectoryScanDepthLimit {
Unlimited,
Limited {
maximum_depth: usize,
},
}Expand description
The maximum directory scan depth option.
Used primarily in DirectoryScanner.
Variants§
Unlimited
No scan depth limit.
Limited
Scan depth is limited to maximum_depth, where the value refers to
the maximum depth of the subdirectory whose contents are still listed.
§Examples
maximum_depth = 0 indicates a scan that will cover only the files and directories
directly in the source directory.
~/scanned-directory
|- foo.csv
|- foo-2.csv
|- bar/
(no entries listed)Notice how contents of the ~/scanned-directory/bar/
directory are not returned in the scan when using depth 0.
maximum_depth = 1 will cover the files and directories directly in the source directory
plus one level of files and subdirectories deeper.
~/scanned-directory
|- foo.csv
|- foo-2.csv
|- bar/
|- hello-world.txt
|- bar2/
(no entries listed)Notice how contents of ~/scanned-directory/bar are listed,
but contents of ~/scanned-directory/bar/bar2 are not.
Trait Implementations§
Source§impl Clone for DirectoryScanDepthLimit
impl Clone for DirectoryScanDepthLimit
Source§fn clone(&self) -> DirectoryScanDepthLimit
fn clone(&self) -> DirectoryScanDepthLimit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DirectoryScanDepthLimit
impl Debug for DirectoryScanDepthLimit
Source§impl Hash for DirectoryScanDepthLimit
impl Hash for DirectoryScanDepthLimit
Source§impl PartialEq for DirectoryScanDepthLimit
impl PartialEq for DirectoryScanDepthLimit
impl Copy for DirectoryScanDepthLimit
impl Eq for DirectoryScanDepthLimit
impl StructuralPartialEq for DirectoryScanDepthLimit
Auto Trait Implementations§
impl Freeze for DirectoryScanDepthLimit
impl RefUnwindSafe for DirectoryScanDepthLimit
impl Send for DirectoryScanDepthLimit
impl Sync for DirectoryScanDepthLimit
impl Unpin for DirectoryScanDepthLimit
impl UnwindSafe for DirectoryScanDepthLimit
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