pub trait CodeSandbox: Send + Sync {
// Required method
fn start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
program: &'life1 str,
functions: &'life2 [String],
limits: &'life3 CodeLimits,
) -> Pin<Box<dyn Future<Output = (Box<dyn Execution>, Suspension)> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
}Expand description
Runs programs: Python source with the given functions defined as globals.
Required Methods§
Sourcefn start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
program: &'life1 str,
functions: &'life2 [String],
limits: &'life3 CodeLimits,
) -> Pin<Box<dyn Future<Output = (Box<dyn Execution>, Suspension)> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
program: &'life1 str,
functions: &'life2 [String],
limits: &'life3 CodeLimits,
) -> Pin<Box<dyn Future<Output = (Box<dyn Execution>, Suspension)> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Start program with each of functions defined as a global that
suspends the program when called. Returns the execution and where it
first stopped.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".