pub struct CommandContext { /* private fields */ }Expand description
Context passed to process managers describing the current execution environment. Clones are cheap and explicit so background handles can own their working roots without juggling lifetimes.
Implementations§
Source§impl CommandContext
impl CommandContext
pub fn new( cwd: &PolicyPath, envs: &HashMap<String, String>, cargo_target_dir: &GuardedPath, workspace_root: &GuardedPath, build_context: &GuardedPath, ) -> Self
pub fn cwd(&self) -> &PolicyPath
pub fn envs(&self) -> &HashMap<String, String>
pub fn cargo_target_dir(&self) -> &GuardedPath
pub fn workspace_root(&self) -> &GuardedPath
pub fn build_context(&self) -> &GuardedPath
Trait Implementations§
Source§impl Clone for CommandContext
impl Clone for CommandContext
Source§fn clone(&self) -> CommandContext
fn clone(&self) -> CommandContext
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 moreAuto Trait Implementations§
impl Freeze for CommandContext
impl RefUnwindSafe for CommandContext
impl Send for CommandContext
impl Sync for CommandContext
impl Unpin for CommandContext
impl UnwindSafe for CommandContext
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