Struct kailua_workspace::Config
[−]
[src]
pub struct Config { pub start_paths: Vec<PathBuf>, pub package_path: Option<Vec<u8>>, pub package_cpath: Option<Vec<u8>>, pub preload: Preload, pub message_locale: Option<Locale>, // some fields omitted }
A configuration being built.
A configuration can be either built incrementally (e.g. from command-line options),
or automatically built from a configuration file.
There is a set of known paths for the configuration file
(currently BASE_DIR/kailua.json
and BASE_DIR/.vscode/kailua.json
),
so the caller can simply call Config::use_default_config_paths
when no configuration file is given.
Fields
start_paths: Vec<PathBuf>
Paths to the start file, if any.
package_path: Option<Vec<u8>>
The explicit value of package.path
, if any.
If this value is set, assigning to package.path
does not change
the checker's behavior and will rather issue an warning.
package_cpath: Option<Vec<u8>>
The explicit value of package.cpath
, if any.
If this value is set, assigning to package.cpath
does not change
the checker's behavior and will rather issue an warning.
preload: Preload
Preloading options.
message_locale: Option<Locale>
A preferred message locale, if any.
Methods
impl Config
[src]
fn from_start_path(start_path: PathBuf) -> Config
fn from_base_dir(base_dir: PathBuf) -> Config
fn base_dir(&self) -> &Path
fn config_path(&self) -> Option<&Path>
fn set_config_path(&mut self, path: PathBuf) -> Result<bool>
fn use_default_config_paths(&mut self)
Trait Implementations
impl Clone for Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more