Struct cargo_subcommand::LocalizedConfig
source · pub struct LocalizedConfig {
pub config: Config,
pub workspace: PathBuf,
}Fields§
§config: Config§workspace: PathBufThe directory containing ./.cargo/config.toml
Implementations§
source§impl LocalizedConfig
impl LocalizedConfig
pub fn new(workspace: PathBuf) -> Result<Self, Error>
sourcepub fn find_cargo_config_for_workspace(
workspace: impl AsRef<Path>
) -> Result<Option<Self>, Error>
pub fn find_cargo_config_for_workspace(
workspace: impl AsRef<Path>
) -> Result<Option<Self>, Error>
Search for and open .cargo/config.toml in any parent of the workspace root path.
sourcepub fn set_env_vars(&self) -> Result<(), EnvError>
pub fn set_env_vars(&self) -> Result<(), EnvError>
Propagate environment variables from this .cargo/config.toml to the process environment
using std::env::set_var().
Note that this is automatically performed when calling Subcommand::new().
Trait Implementations§
source§impl Clone for LocalizedConfig
impl Clone for LocalizedConfig
source§fn clone(&self) -> LocalizedConfig
fn clone(&self) -> LocalizedConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more