pub struct WorkspaceProcessEnvironment { /* private fields */ }Expand description
Host-derived paths used to construct one action sandbox.
HOME, PATH, and the rest of the caller’s environment reach the child. The confinement layer then grants the workspace, baseline directories, and any enabled host-integration endpoints.
Implementations§
Source§impl WorkspaceProcessEnvironment
impl WorkspaceProcessEnvironment
Sourcepub fn from_current_process() -> Self
pub fn from_current_process() -> Self
Builds an environment layout from the current process environment.
The resulting action plan intentionally does not use --clearenv; the
caller’s environment reaches the child and Merry overrides only the
validated process defaults and configured assignments.
Sourcepub fn new(
path: impl Into<OsString>,
home: impl Into<PathBuf>,
tmp_source: impl Into<PathBuf>,
) -> Result<Self, ProcessRunnerError>
pub fn new( path: impl Into<OsString>, home: impl Into<PathBuf>, tmp_source: impl Into<PathBuf>, ) -> Result<Self, ProcessRunnerError>
Creates a validated environment layout for an action sandbox.
Sourcepub fn with_overrides(
self,
overrides: impl IntoIterator<Item = (OsString, OsString)>,
) -> Result<Self, ProcessRunnerError>
pub fn with_overrides( self, overrides: impl IntoIterator<Item = (OsString, OsString)>, ) -> Result<Self, ProcessRunnerError>
Validates and adds environment assignments after the sandbox defaults.
Sourcepub fn with_gpg_agent_sockets(self, sockets: GpgAgentSockets) -> Self
pub fn with_gpg_agent_sockets(self, sockets: GpgAgentSockets) -> Self
Installs discovered GnuPG sockets without granting access to them.
Sourcepub fn with_ssh_agent_socket(
self,
path: impl Into<PathBuf>,
) -> Result<Self, ProcessRunnerError>
pub fn with_ssh_agent_socket( self, path: impl Into<PathBuf>, ) -> Result<Self, ProcessRunnerError>
Selects a validated SSH socket path without granting access to it.
Sourcepub fn with_host_integrations(
self,
integrations: impl IntoIterator<Item = HostIntegration>,
) -> Self
pub fn with_host_integrations( self, integrations: impl IntoIterator<Item = HostIntegration>, ) -> Self
Enables selected host IPC integrations for child process actions.
Sourcepub fn validate_for_workspace(
&self,
workspace_root: &Path,
) -> Result<Self, ProcessRunnerError>
pub fn validate_for_workspace( &self, workspace_root: &Path, ) -> Result<Self, ProcessRunnerError>
Validates the host paths before constructing one action environment.
The temporary directory must resolve to a real temporary directory. The returned environment uses its resolved path so a symlink cannot change the source after validation into a non-temporary tree.
Trait Implementations§
Source§impl Clone for WorkspaceProcessEnvironment
impl Clone for WorkspaceProcessEnvironment
Source§impl Debug for WorkspaceProcessEnvironment
impl Debug for WorkspaceProcessEnvironment
impl Eq for WorkspaceProcessEnvironment
impl StructuralPartialEq for WorkspaceProcessEnvironment
Auto Trait Implementations§
impl Forget for WorkspaceProcessEnvironment
impl Freeze for WorkspaceProcessEnvironment
impl Move for WorkspaceProcessEnvironment
impl RefUnwindSafe for WorkspaceProcessEnvironment
impl Send for WorkspaceProcessEnvironment
impl Sync for WorkspaceProcessEnvironment
impl Unpin for WorkspaceProcessEnvironment
impl UnsafeUnpin for WorkspaceProcessEnvironment
impl UnwindSafe for WorkspaceProcessEnvironment
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.