Struct which::WhichConfig

source ·
pub struct WhichConfig { /* private fields */ }
Expand description

A wrapper containing all functionality in this crate.

Implementations§

Whether or not to use the current working directory. true by default.

Panics

If regex was set previously, and you’ve just passed in use_cwd: true, this will panic.

Sets a custom path for resolving relative paths.

Panics

If regex was set previously, this will panic.

Sets the path name regex to search for. You MUST call this, or Self::binary_name prior to searching.

When Regex is disabled this function takes the unit type as a stand in. The parameter will change when Regex is enabled.

Panics

If the regex feature wasn’t turned on for this crate this will always panic. Additionally if a cwd (aka current working directory) or binary_name was set previously, this will panic, as those options are incompatible with regex.

Sets the path name to search for. You MUST call this, or Self::regex prior to searching.

Panics

If a regex was set previously this will panic as this is not compatible with regex.

Uses the given string instead of the PATH env variable.

Uses the PATH env variable. Enabled by default.

Finishes configuring, runs the query and returns the first result.

Finishes configuring, runs the query and returns all results.

Trait Implementations§

Returns the “default value” for a type. Read more

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 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.