[−][src]Struct cargo::util::config::Config
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 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( | [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( | [src] |
pub fn get_list( | [src] |
pub fn get_list_or_split_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( | [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 | [src] |
pub fn creation_time(&self) -> Instant | [src] |
pub fn get<'de, T: Deserialize<'de>>(&self, key: &str) -> CargoResult<T> | [src] |
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Erased for T
impl<T> Erased for T
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self