pub struct PythonIsolate { /* private fields */ }Expand description
Persistent Pyodide isolate keeping the interpreter hot between invocations.
Implementations§
Source§impl PythonIsolate
impl PythonIsolate
pub fn new(config: IsolateConfig) -> Result<Self>
Sourcepub fn load_bundle(&mut self, handle: &BundleHandle) -> Result<()>
pub fn load_bundle(&mut self, handle: &BundleHandle) -> Result<()>
Ensures the isolate has materialised the bundle requested by handle.
Sourcepub fn invoke_with_strategy<S: PyInvocationStrategy>(
&mut self,
handler: &HandlerSession,
strategy: &mut S,
) -> Result<ExecutionOutcome>
pub fn invoke_with_strategy<S: PyInvocationStrategy>( &mut self, handler: &HandlerSession, strategy: &mut S, ) -> Result<ExecutionOutcome>
Invokes the handler with a caller-supplied strategy.
pub fn cleanup_mode(&self) -> CleanupMode
pub fn runtime_language(&self) -> Option<RuntimeLanguage>
pub fn runtime(&mut self) -> &mut PyRuntime
Sourcepub fn run_inline_python(
&mut self,
code: &str,
entrypoint: &str,
) -> Result<ExecutionOutcome>
pub fn run_inline_python( &mut self, code: &str, entrypoint: &str, ) -> Result<ExecutionOutcome>
Executes inline Python code using default manifest options and entrypoint.
Sourcepub fn run_inline_python_with_options(
&mut self,
code: &str,
options: InlinePythonOptions,
) -> Result<ExecutionOutcome>
pub fn run_inline_python_with_options( &mut self, code: &str, options: InlinePythonOptions, ) -> Result<ExecutionOutcome>
Executes inline Python code with manifest-style configuration options.
Auto Trait Implementations§
impl Freeze for PythonIsolate
impl !RefUnwindSafe for PythonIsolate
impl !Send for PythonIsolate
impl !Sync for PythonIsolate
impl Unpin for PythonIsolate
impl !UnwindSafe for PythonIsolate
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