pub struct LocalSandbox { /* private fields */ }Expand description
A local-filesystem sandbox: tools run against a real directory on disk.
This is the Rust equivalent of Flue’s local() from
@flue/runtime/node.
Implementations§
Source§impl LocalSandbox
impl LocalSandbox
Sourcepub fn with_limits(self, limits: Limits) -> Self
pub fn with_limits(self, limits: Limits) -> Self
Override the default resource limits.
Sourcepub fn with_exec_sandbox(
self,
backend: Arc<dyn ProcessSandbox>,
policy: SandboxPolicy,
) -> Self
pub fn with_exec_sandbox( self, backend: Arc<dyn ProcessSandbox>, policy: SandboxPolicy, ) -> Self
Attach a process-sandbox backend (WP-2 slot). The backend is probed at
session construction; the policy decides what happens if enforcement
falls short of policy.profile. With no backend attached, all spawns
behave exactly as before WP-2.
Trait Implementations§
Source§impl Sandbox for LocalSandbox
impl Sandbox for LocalSandbox
Source§fn env_for<'life0, 'life1, 'async_trait>(
&'life0 self,
_workdir: &'life1 Path,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Arc<dyn SessionEnv>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn env_for<'life0, 'life1, 'async_trait>(
&'life0 self,
_workdir: &'life1 Path,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Arc<dyn SessionEnv>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Build the environment for a session rooted at
workdir.Auto Trait Implementations§
impl !RefUnwindSafe for LocalSandbox
impl !UnwindSafe for LocalSandbox
impl Freeze for LocalSandbox
impl Send for LocalSandbox
impl Sync for LocalSandbox
impl Unpin for LocalSandbox
impl UnsafeUnpin for LocalSandbox
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