pub struct RuntimeSession { /* private fields */ }Expand description
Same-process runtime session containing multiple managed services.
Implementations§
Source§impl RuntimeSession
impl RuntimeSession
Sourcepub async fn new(
spec: RuntimeSessionSpec,
registry: &ProtocolDriverRegistry,
extensions: RuntimeExtensions,
) -> RuntimeResult<Self>
pub async fn new( spec: RuntimeSessionSpec, registry: &ProtocolDriverRegistry, extensions: RuntimeExtensions, ) -> RuntimeResult<Self>
Builds a runtime session from the provided spec and registry.
Sourcepub async fn start(
&self,
fallback_readiness_timeout: Duration,
) -> RuntimeResult<()>
pub async fn start( &self, fallback_readiness_timeout: Duration, ) -> RuntimeResult<()>
Starts all managed services and waits for readiness.
Sourcepub async fn stop(&self) -> RuntimeResult<()>
pub async fn stop(&self) -> RuntimeResult<()>
Stops all managed services in reverse order.
Sourcepub fn devices(&self) -> DeviceRegistry
pub fn devices(&self) -> DeviceRegistry
Returns the shared controller-visible device registry.
Sourcepub async fn snapshots(&self) -> RuntimeResult<Vec<ServiceSnapshot>>
pub async fn snapshots(&self) -> RuntimeResult<Vec<ServiceSnapshot>>
Returns the current service snapshots.
Sourcepub fn handles(&self) -> &[ServiceHandle]
pub fn handles(&self) -> &[ServiceHandle]
Returns the managed handles.
Auto Trait Implementations§
impl Freeze for RuntimeSession
impl !RefUnwindSafe for RuntimeSession
impl Send for RuntimeSession
impl Sync for RuntimeSession
impl Unpin for RuntimeSession
impl UnsafeUnpin for RuntimeSession
impl !UnwindSafe for RuntimeSession
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