pub struct LocalizedConfig {
pub config: Config,
pub workspace: PathBuf,
}
Fields§
§config: Config
§workspace: PathBuf
The 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 duplicate 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 moreSource§impl Debug for LocalizedConfig
impl Debug for LocalizedConfig
Auto Trait Implementations§
impl Freeze for LocalizedConfig
impl RefUnwindSafe for LocalizedConfig
impl Send for LocalizedConfig
impl Sync for LocalizedConfig
impl Unpin for LocalizedConfig
impl UnwindSafe for LocalizedConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more