Struct cargo::util::config::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
Configuration information for cargo. This is not specific to a build, it is information relating to cargo itself.
This struct implements Default
: all fields can be inferred.
Methods
impl Config
[src]
pub fn new(shell: Shell, cwd: PathBuf, homedir: PathBuf) -> Config
[src]
pub fn default() -> CargoResult<Config>
[src]
pub fn home(&self) -> &Filesystem
[src]
The user's cargo home directory (OS-dependent)
pub fn git_path(&self) -> Filesystem
[src]
The cargo git directory (<cargo_home>/git
)
pub fn registry_index_path(&self) -> Filesystem
[src]
The cargo registry index directory (<cargo_home>/registry/index
)
pub fn registry_cache_path(&self) -> Filesystem
[src]
The cargo registry cache directory (<cargo_home>/registry/path
)
pub fn registry_source_path(&self) -> Filesystem
[src]
The cargo registry source directory (<cargo_home>/registry/src
)
pub fn shell(&self) -> RefMut<Shell>
[src]
Get a reference to the shell, for e.g. writing error messages
pub fn rustdoc(&self) -> CargoResult<&Path>
[src]
Get the path to the rustdoc
executable
pub fn rustc(&self) -> CargoResult<&Rustc>
[src]
Get the path to the rustc
executable
pub fn cargo_exe(&self) -> CargoResult<&Path>
[src]
Get the path to the cargo
executable
pub fn values(&self) -> CargoResult<&HashMap<String, ConfigValue>>
[src]
pub fn set_values(
&self,
values: HashMap<String, ConfigValue>
) -> CargoResult<()>
[src]
&self,
values: HashMap<String, ConfigValue>
) -> CargoResult<()>
pub fn cwd(&self) -> &Path
[src]
pub fn target_dir(&self) -> CargoResult<Option<Filesystem>>
[src]
pub fn get_string(&self, key: &str) -> CargoResult<Option<Value<String>>>
[src]
pub fn get_bool(&self, key: &str) -> CargoResult<Option<Value<bool>>>
[src]
pub fn get_path(&self, key: &str) -> CargoResult<Option<Value<PathBuf>>>
[src]
pub fn get_path_and_args(
&self,
key: &str
) -> CargoResult<Option<Value<(PathBuf, Vec<String>)>>>
[src]
&self,
key: &str
) -> CargoResult<Option<Value<(PathBuf, Vec<String>)>>>
pub fn get_list(
&self,
key: &str
) -> CargoResult<Option<Value<Vec<(String, PathBuf)>>>>
[src]
&self,
key: &str
) -> CargoResult<Option<Value<Vec<(String, PathBuf)>>>>
pub fn get_list_or_split_string(
&self,
key: &str
) -> CargoResult<Option<Value<Vec<String>>>>
[src]
&self,
key: &str
) -> CargoResult<Option<Value<Vec<String>>>>
pub fn get_table(
&self,
key: &str
) -> CargoResult<Option<Value<HashMap<String, CV>>>>
[src]
&self,
key: &str
) -> CargoResult<Option<Value<HashMap<String, CV>>>>
pub fn get_i64(&self, key: &str) -> CargoResult<Option<Value<i64>>>
[src]
pub fn net_retry(&self) -> CargoResult<i64>
[src]
pub fn expected<T>(&self, ty: &str, key: &str, val: CV) -> CargoResult<T>
[src]
pub fn configure(
&mut self,
verbose: u32,
quiet: Option<bool>,
color: &Option<String>,
frozen: bool,
locked: bool,
unstable_flags: &[String]
) -> CargoResult<()>
[src]
&mut self,
verbose: u32,
quiet: Option<bool>,
color: &Option<String>,
frozen: bool,
locked: bool,
unstable_flags: &[String]
) -> CargoResult<()>
pub fn cli_unstable(&self) -> &CliUnstable
[src]
pub fn extra_verbose(&self) -> bool
[src]
pub fn network_allowed(&self) -> bool
[src]
pub fn lock_update_allowed(&self) -> bool
[src]
pub fn load_values(&self) -> CargoResult<HashMap<String, ConfigValue>>
[src]
Loads configuration from the filesystem
pub fn get_registry_index(&self, registry: &str) -> CargoResult<Url>
[src]
Gets the index for a registry.