[][src]Struct cargo::util::config::Config

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 default_registry(&self) -> CargoResult<Option<String>>
[src]

The default cargo registry (alternative-registry)

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, ws: Option<&Workspace>) -> 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 profiles(&self) -> CargoResult<&ConfigProfiles>
[src]

pub fn values(&self) -> CargoResult<&HashMap<String, ConfigValue>>
[src]

pub fn set_values(
    &self,
    values: HashMap<String, ConfigValue>
) -> CargoResult<()>
[src]

pub fn reload_rooted_at_cargo_home(&mut self) -> CargoResult<()>
[src]

pub fn cwd(&self) -> &Path
[src]

pub fn target_dir(&self) -> CargoResult<Option<Filesystem>>
[src]

pub fn set_env(&mut self, env: HashMap<String, String>)
[src]

pub fn get_string(&self, key: &str) -> CargoResult<OptValue<String>>
[src]

pub fn get_bool(&self, key: &str) -> CargoResult<OptValue<bool>>
[src]

pub fn get_path(&self, key: &str) -> CargoResult<OptValue<PathBuf>>
[src]

pub fn get_path_and_args(
    &self,
    key: &str
) -> CargoResult<OptValue<(PathBuf, Vec<String>)>>
[src]

pub fn get_list(
    &self,
    key: &str
) -> CargoResult<OptValue<Vec<(String, PathBuf)>>>
[src]

pub fn get_list_or_split_string(
    &self,
    key: &str
) -> CargoResult<OptValue<Vec<String>>>
[src]

pub fn get_table(&self, key: &str) -> CargoResult<OptValue<HashMap<String, CV>>>
[src]

pub fn get_i64(&self, key: &str) -> CargoResult<OptValue<i64>>
[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<()>
[src]

pub fn cli_unstable(&self) -> &CliUnstable
[src]

pub fn extra_verbose(&self) -> bool
[src]

pub fn network_allowed(&self) -> bool
[src]

pub fn frozen(&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.

pub fn jobserver_from_env(&self) -> Option<&Client>
[src]

pub fn http(&self) -> CargoResult<&RefCell<Easy>>
[src]

pub fn crates_io_source_id<F>(&self, f: F) -> CargoResult<SourceId> where
    F: FnMut() -> CargoResult<SourceId>, 
[src]

pub fn creation_time(&self) -> Instant
[src]

pub fn get<'de, T: Deserialize<'de>>(&self, key: &str) -> CargoResult<T>
[src]

Trait Implementations

impl Debug for Config
[src]

Auto Trait Implementations

impl !Send for Config

impl !Sync for Config

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self