pub struct Ctx {
pub home: PathBuf,
pub cwd: PathBuf,
pub env: BTreeMap<String, String>,
pub path: Vec<PathBuf>,
}Expand description
The slice of the process environment that profiles read: home and working
directories, environment variables, and the PATH search list. Tests build
one by hand so nothing depends on the real machine.
Fields§
§home: PathBuf§cwd: PathBuf§env: BTreeMap<String, String>§path: Vec<PathBuf>Implementations§
Source§impl Ctx
impl Ctx
pub fn from_process() -> Ctx
Sourcepub fn at(root: &Path) -> Ctx
pub fn at(root: &Path) -> Ctx
The process context with cwd set to a project directory (where the manifest
lives), so project-relative paths resolve there and not in a subdirectory.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ctx
impl RefUnwindSafe for Ctx
impl Send for Ctx
impl Sync for Ctx
impl Unpin for Ctx
impl UnsafeUnpin for Ctx
impl UnwindSafe for Ctx
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