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]
impl Config
pub fn new(shell: Shell, cwd: PathBuf, homedir: PathBuf) -> Config
[src]
pub fn new(shell: Shell, cwd: PathBuf, homedir: PathBuf) -> Config
pub fn default() -> CargoResult<Config>
[src]
pub fn default() -> CargoResult<Config>
pub fn home(&self) -> &Filesystem
[src]
pub fn home(&self) -> &Filesystem
The user's cargo home directory (OS-dependent)
pub fn git_path(&self) -> Filesystem
[src]
pub fn git_path(&self) -> Filesystem
The cargo git directory (<cargo_home>/git
)
pub fn registry_index_path(&self) -> Filesystem
[src]
pub fn registry_index_path(&self) -> Filesystem
The cargo registry index directory (<cargo_home>/registry/index
)
pub fn registry_cache_path(&self) -> Filesystem
[src]
pub fn registry_cache_path(&self) -> Filesystem
The cargo registry cache directory (<cargo_home>/registry/path
)
pub fn registry_source_path(&self) -> Filesystem
[src]
pub fn registry_source_path(&self) -> Filesystem
The cargo registry source directory (<cargo_home>/registry/src
)
pub fn shell(&self) -> RefMut<Shell>
[src]
pub fn shell(&self) -> RefMut<Shell>
Get a reference to the shell, for e.g. writing error messages
pub fn rustdoc(&self) -> CargoResult<&Path>
[src]
pub fn rustdoc(&self) -> CargoResult<&Path>
Get the path to the rustdoc
executable
pub fn rustc(&self, ws: Option<&Workspace>) -> CargoResult<Rustc>
[src]
pub fn rustc(&self, ws: Option<&Workspace>) -> CargoResult<Rustc>
Get the path to the rustc
executable
pub fn cargo_exe(&self) -> CargoResult<&Path>
[src]
pub fn cargo_exe(&self) -> CargoResult<&Path>
Get the path to the cargo
executable
pub fn profiles(&self) -> CargoResult<&ConfigProfiles>
[src]
pub fn profiles(&self) -> CargoResult<&ConfigProfiles>
pub fn values(&self) -> CargoResult<&HashMap<String, ConfigValue>>
[src]
pub fn values(&self) -> CargoResult<&HashMap<String, ConfigValue>>
pub fn set_values(
&self,
values: HashMap<String, ConfigValue>
) -> CargoResult<()>
[src]
pub fn set_values(
&self,
values: HashMap<String, ConfigValue>
) -> CargoResult<()>
pub fn cwd(&self) -> &Path
[src]
pub fn cwd(&self) -> &Path
pub fn target_dir(&self) -> CargoResult<Option<Filesystem>>
[src]
pub fn target_dir(&self) -> CargoResult<Option<Filesystem>>
pub fn set_env(&mut self, env: HashMap<String, String>)
[src]
pub fn set_env(&mut self, env: HashMap<String, String>)
pub fn get_string(&self, key: &str) -> CargoResult<OptValue<String>>
[src]
pub fn get_string(&self, key: &str) -> CargoResult<OptValue<String>>
pub fn get_bool(&self, key: &str) -> CargoResult<OptValue<bool>>
[src]
pub fn get_bool(&self, key: &str) -> CargoResult<OptValue<bool>>
pub fn get_path(&self, key: &str) -> CargoResult<OptValue<PathBuf>>
[src]
pub fn get_path(&self, key: &str) -> CargoResult<OptValue<PathBuf>>
pub fn get_path_and_args(
&self,
key: &str
) -> CargoResult<OptValue<(PathBuf, Vec<String>)>>
[src]
pub fn get_path_and_args(
&self,
key: &str
) -> CargoResult<OptValue<(PathBuf, Vec<String>)>>
pub fn get_list(
&self,
key: &str
) -> CargoResult<OptValue<Vec<(String, PathBuf)>>>
[src]
pub fn get_list(
&self,
key: &str
) -> CargoResult<OptValue<Vec<(String, PathBuf)>>>
pub fn get_list_or_split_string(
&self,
key: &str
) -> CargoResult<OptValue<Vec<String>>>
[src]
pub fn get_list_or_split_string(
&self,
key: &str
) -> CargoResult<OptValue<Vec<String>>>
pub fn get_table(&self, key: &str) -> CargoResult<OptValue<HashMap<String, CV>>>
[src]
pub fn get_table(&self, key: &str) -> CargoResult<OptValue<HashMap<String, CV>>>
pub fn get_i64(&self, key: &str) -> CargoResult<OptValue<i64>>
[src]
pub fn get_i64(&self, key: &str) -> CargoResult<OptValue<i64>>
pub fn configure(
&mut self,
verbose: u32,
quiet: Option<bool>,
color: &Option<String>,
frozen: bool,
locked: bool,
target_dir: &Option<PathBuf>,
unstable_flags: &[String]
) -> CargoResult<()>
[src]
pub fn configure(
&mut self,
verbose: u32,
quiet: Option<bool>,
color: &Option<String>,
frozen: bool,
locked: bool,
target_dir: &Option<PathBuf>,
unstable_flags: &[String]
) -> CargoResult<()>
pub fn cli_unstable(&self) -> &CliUnstable
[src]
pub fn cli_unstable(&self) -> &CliUnstable
pub fn extra_verbose(&self) -> bool
[src]
pub fn extra_verbose(&self) -> bool
pub fn network_allowed(&self) -> bool
[src]
pub fn network_allowed(&self) -> bool
pub fn frozen(&self) -> bool
[src]
pub fn frozen(&self) -> bool
pub fn lock_update_allowed(&self) -> bool
[src]
pub fn lock_update_allowed(&self) -> bool
pub fn load_values(&self) -> CargoResult<HashMap<String, ConfigValue>>
[src]
pub fn load_values(&self) -> CargoResult<HashMap<String, ConfigValue>>
Loads configuration from the filesystem
pub fn get_registry_index(&self, registry: &str) -> CargoResult<Url>
[src]
pub fn get_registry_index(&self, registry: &str) -> CargoResult<Url>
Gets the index for a registry.
pub fn jobserver_from_env(&self) -> Option<&Client>
[src]
pub fn jobserver_from_env(&self) -> Option<&Client>
pub fn http(&self) -> CargoResult<&RefCell<Easy>>
[src]
pub fn http(&self) -> CargoResult<&RefCell<Easy>>
pub fn crates_io_source_id<F>(&self, f: F) -> CargoResult<SourceId> where
F: FnMut() -> CargoResult<SourceId>,
[src]
pub fn crates_io_source_id<F>(&self, f: F) -> CargoResult<SourceId> where
F: FnMut() -> CargoResult<SourceId>,
pub fn creation_time(&self) -> Instant
[src]
pub fn creation_time(&self) -> Instant
pub fn get<'de, T: Deserialize<'de>>(&self, key: &str) -> CargoResult<T>
[src]
pub fn get<'de, T: Deserialize<'de>>(&self, key: &str) -> CargoResult<T>