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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Implements default options

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();

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.