Skip to main content

Sandbox

Trait Sandbox 

Source
pub trait Sandbox: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    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;
}
Expand description

A factory that produces a SessionEnv for one session.

Required Methods§

Source

fn name(&self) -> &str

Human-readable name (e.g. local, virtual, e2b).

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,

Build the environment for a session rooted at workdir.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§