pub struct DefaultModuleResolver {
    pub enable_global_modules: bool,
    pub local_modules_path: Option<String>,
}
Expand description

The default filesystem-based module resolver.

Resolution strategy

This resolver uses the following strategy to locate module files:

  1. If triggered by a program, the program’s containing directory is searched first.
  2. The directory specified in local_modules_path is searched next. If not specified, uses the host application’s current working directory.
  3. If enable_global_modules is set to true, the global modules path is searched.

Fields

enable_global_modules: bool

Enables loading modules from RANT_MODULES_PATH.

local_modules_path: Option<String>

Specifies a preferred module loading path with higher precedence than the global module path. If not specified, looks in the current working directory.

Implementations

The name of the environment variable that used to provide the global modules path.

Trait Implementations

Formats the value using the given formatter. Read more

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.