Struct lrg::LrgOptions
source · pub struct LrgOptions {
pub min_depth: usize,
pub max_depth: usize,
pub follow_links: bool,
pub include_dirs: bool,
}
Expand description
Options when constructing an Lrg
struct.
Examples
Can be constructed like normal:
let opts = LrgOptions {
min_depth: 1,
max_depth: 5,
follow_links: false,
include_dirs: true,
};
Or can also inherit default options
:
let opts = LrgOptions {
min_depth: 5,
max_depth: 10,
..LrgOptions::default()
};
Fields§
§min_depth: usize
Specifies them minimum depth for searching Minimum depth is the depth at which to start searching
max_depth: usize
§follow_links: bool
Specifies whether to follow links while searching
include_dirs: bool
Speicifies whether to include directories in the search
Trait Implementations§
source§impl Clone for LrgOptions
impl Clone for LrgOptions
source§fn clone(&self) -> LrgOptions
fn clone(&self) -> LrgOptions
Returns a copy 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 LrgOptions
impl Debug for LrgOptions
source§impl Default for LrgOptions
impl Default for LrgOptions
Implements default options
source§fn default() -> LrgOptions
fn default() -> LrgOptions
The default function.
Examples
use lrg::LrgOptions;
// Gives options that recurse as far as possible, don't follow links,
// and don't include directories.
let options = LrgOptions::default();