pub struct SandboxExecutionEnvironment { /* private fields */ }Expand description
Execution environment backed by a long-lived sandbox provider JSONL process.
Implementations§
Source§impl SandboxExecutionEnvironment
impl SandboxExecutionEnvironment
Sourcepub async fn open(
program: impl Into<PathBuf>,
request: OpenSandboxRequest,
) -> Result<Self>
pub async fn open( program: impl Into<PathBuf>, request: OpenSandboxRequest, ) -> Result<Self>
Start program serve, open a sandbox session, and wrap it as an execution environment.
pub fn from_session( client: Arc<SandboxProviderJsonlClient>, session: SandboxSession, ) -> Self
pub fn client(&self) -> &Arc<SandboxProviderJsonlClient>
pub fn session(&self) -> &SandboxSession
Trait Implementations§
Source§impl AgentExecutionEnvironment for SandboxExecutionEnvironment
impl AgentExecutionEnvironment for SandboxExecutionEnvironment
fn cwd(&self) -> Option<&EnvironmentPath>
fn create_dir_all<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 EnvironmentPath,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 EnvironmentPath,
content: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 EnvironmentPath,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 EnvironmentPath,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_temp_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EnvironmentPath>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exec<'life0, 'life1, 'async_trait>(
&'life0 self,
request: ExecRequest,
sink: &'life1 mut dyn ExecEventSink,
) -> Pin<Box<dyn Future<Output = Result<ExecOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn spawn<'life0, 'async_trait>(
&'life0 self,
request: ExecRequest,
sink: Option<Box<dyn ExecEventSink>>,
) -> Pin<Box<dyn Future<Output = Result<SpawnOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl Clone for SandboxExecutionEnvironment
impl Clone for SandboxExecutionEnvironment
Source§fn clone(&self) -> SandboxExecutionEnvironment
fn clone(&self) -> SandboxExecutionEnvironment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for SandboxExecutionEnvironment
impl !UnwindSafe for SandboxExecutionEnvironment
impl Freeze for SandboxExecutionEnvironment
impl Send for SandboxExecutionEnvironment
impl Sync for SandboxExecutionEnvironment
impl Unpin for SandboxExecutionEnvironment
impl UnsafeUnpin for SandboxExecutionEnvironment
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