pub trait RuntimeConnection: Send {
// Required methods
fn handle(&self) -> &RuntimeHandle;
fn send_input<'life0, 'async_trait>(
&'life0 mut self,
input: RuntimeInput,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessEvent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn interrupt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn respond<'life0, 'async_trait>(
&'life0 mut self,
request_id: Value,
response: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn steer<'life0, 'async_trait>(
&'life0 mut self,
_text: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
One connected harness-native runtime session.
Required Methods§
Sourcefn handle(&self) -> &RuntimeHandle
fn handle(&self) -> &RuntimeHandle
Identity and endpoint of this connection.
Sourcefn send_input<'life0, 'async_trait>(
&'life0 mut self,
input: RuntimeInput,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_input<'life0, 'async_trait>(
&'life0 mut self,
input: RuntimeInput,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit structured user input and return the harness-native turn id when one is allocated.
Sourcefn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Wait for the next native live event.
Sourcefn interrupt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn interrupt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Interrupt the current turn, when supported.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".