pub struct AppRuntimePool { /* private fields */ }Expand description
Async pool that starts, reuses, and stops app runtimes without mutating config.
Runtime metadata and resume hints remain intact when runtimes are reused or restarted.
Implementations§
Source§impl AppRuntimePool
impl AppRuntimePool
Sourcepub fn new(manager: AppRuntimeManager) -> Self
pub fn new(manager: AppRuntimeManager) -> Self
Create a new pool backed by launch-ready runtime configs.
Sourcepub fn available(&self) -> Vec<AppRuntimeSummary>
pub fn available(&self) -> Vec<AppRuntimeSummary>
List available runtimes and metadata without touching stored definitions.
Sourcepub async fn running(&self) -> Vec<AppRuntimeSummary>
pub async fn running(&self) -> Vec<AppRuntimeSummary>
List currently running runtimes with metadata/resume hints preserved.
Sourcepub fn launcher(&self, name: &str) -> Option<AppRuntimeLauncher>
pub fn launcher(&self, name: &str) -> Option<AppRuntimeLauncher>
Returns a launch-ready config bundle for the given runtime.
Sourcepub fn prepare(&self, name: &str) -> Result<AppRuntimeHandle, AppRuntimeError>
pub fn prepare(&self, name: &str) -> Result<AppRuntimeHandle, AppRuntimeError>
Prepare a stdio config + metadata for a runtime without starting it.
Sourcepub async fn start(
&self,
name: &str,
client: ClientInfo,
) -> Result<Arc<ManagedAppRuntime>, AppRuntimeError>
pub async fn start( &self, name: &str, client: ClientInfo, ) -> Result<Arc<ManagedAppRuntime>, AppRuntimeError>
Start (or reuse) an app runtime. Subsequent calls reuse an existing instance.
Sourcepub async fn stop(&self, name: &str) -> Result<(), AppRuntimeError>
pub async fn stop(&self, name: &str) -> Result<(), AppRuntimeError>
Stop a running runtime and remove it from the pool.
Sourcepub async fn stop_all(&self) -> Result<(), AppRuntimeError>
pub async fn stop_all(&self) -> Result<(), AppRuntimeError>
Stop all running runtimes (best-effort) and clear the pool.
Trait Implementations§
Source§impl Clone for AppRuntimePool
impl Clone for AppRuntimePool
Source§fn clone(&self) -> AppRuntimePool
fn clone(&self) -> AppRuntimePool
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for AppRuntimePool
impl !RefUnwindSafe for AppRuntimePool
impl Send for AppRuntimePool
impl Sync for AppRuntimePool
impl Unpin for AppRuntimePool
impl UnsafeUnpin for AppRuntimePool
impl !UnwindSafe for AppRuntimePool
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