pub struct ExecProviders {
pub process: Arc<dyn Process>,
pub filesystem: Arc<dyn FileSystem>,
pub network: Arc<dyn Network>,
pub sandbox: Arc<dyn Sandbox>,
}Expand description
The four providers a tool reaches the machine through.
One field on a ToolContext rather
than four, because they are swapped as a set: a deployment executing
elsewhere that kept this machine’s filesystem would be running commands
against files that are not there.
Fields§
§process: Arc<dyn Process>§filesystem: Arc<dyn FileSystem>§network: Arc<dyn Network>§sandbox: Arc<dyn Sandbox>Implementations§
Source§impl ExecProviders
impl ExecProviders
Sourcepub fn in_process() -> Self
pub fn in_process() -> Self
Nothing on the machine: a memory tree, commands decided in advance, no network, and a sandbox honest enough to say it constrains nothing.
The provider beside this machine’s (platform::local_providers).
Switching is this call.
Sourcepub fn with_network(self, n: Arc<dyn Network>) -> Self
pub fn with_network(self, n: Arc<dyn Network>) -> Self
Replace the network without touching the rest — the egress policy is per-deployment while the other three are per-machine.
Trait Implementations§
Source§impl Clone for ExecProviders
impl Clone for ExecProviders
Auto Trait Implementations§
impl !RefUnwindSafe for ExecProviders
impl !UnwindSafe for ExecProviders
impl Forget for ExecProviders
impl Freeze for ExecProviders
impl Move for ExecProviders
impl Send for ExecProviders
impl Sync for ExecProviders
impl Unpin for ExecProviders
impl UnsafeUnpin for ExecProviders
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