pub struct RuntimeHandle { /* private fields */ }Expand description
Handle for interacting with a running embedded Talos runtime.
Implementations§
Source§impl RuntimeHandle
impl RuntimeHandle
Sourcepub async fn submit(&self, message: impl Into<String>) -> RuntimeResult<()>
pub async fn submit(&self, message: impl Into<String>) -> RuntimeResult<()>
Submits a user message as a new turn.
Sourcepub async fn preview_request(
&self,
message: impl Into<String>,
) -> RuntimeResult<()>
pub async fn preview_request( &self, message: impl Into<String>, ) -> RuntimeResult<()>
Requests a provider request preview without making a provider call.
Sourcepub async fn interrupt(&self) -> RuntimeResult<()>
pub async fn interrupt(&self) -> RuntimeResult<()>
Interrupts the active turn, if any.
Sourcepub async fn next_event(&mut self) -> Option<SessionEvent>
pub async fn next_event(&mut self) -> Option<SessionEvent>
Receives the next runtime event.
Sourcepub fn shutdown_controller(&self) -> RuntimeShutdownHandle
pub fn shutdown_controller(&self) -> RuntimeShutdownHandle
Returns a cloneable controller that can only initiate or join shutdown.
Sourcepub async fn shutdown_with(
&self,
options: ShutdownOptions,
) -> RuntimeResult<ShutdownReport>
pub async fn shutdown_with( &self, options: ShutdownOptions, ) -> RuntimeResult<ShutdownReport>
Starts or joins structured bounded shutdown without consuming the handle.
Sourcepub async fn shutdown(self) -> RuntimeResult<()>
pub async fn shutdown(self) -> RuntimeResult<()>
Shuts down the runtime actor and waits for it to finish.
Trait Implementations§
Source§impl Drop for RuntimeHandle
impl Drop for RuntimeHandle
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeHandle
impl !UnwindSafe for RuntimeHandle
impl Freeze for RuntimeHandle
impl Send for RuntimeHandle
impl Sync for RuntimeHandle
impl Unpin for RuntimeHandle
impl UnsafeUnpin for RuntimeHandle
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