Struct cargo_subcommand::LocalizedConfig
source · [−]pub struct LocalizedConfig {
pub config: Config,
pub workspace: PathBuf,
}
Fields
config: Config
workspace: PathBuf
The directory containing ./.cargo/config.toml
Implementations
sourceimpl 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
sourceimpl Clone for LocalizedConfig
impl Clone for LocalizedConfig
sourcefn clone(&self) -> LocalizedConfig
fn clone(&self) -> LocalizedConfig
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LocalizedConfig
impl Debug for LocalizedConfig
Auto Trait Implementations
impl RefUnwindSafe for LocalizedConfig
impl Send for LocalizedConfig
impl Sync for LocalizedConfig
impl Unpin for LocalizedConfig
impl UnwindSafe for LocalizedConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more