pub struct HostedHarnessConnection { /* private fields */ }Expand description
SDK connection to a hosted native runtime. Closing it shuts down the owner runtime; terminal HTTP attachments are non-owning frontend leases.
Trait Implementations§
Source§impl RuntimeConnection for HostedHarnessConnection
impl RuntimeConnection for HostedHarnessConnection
Source§fn handle(&self) -> &RuntimeHandle
fn handle(&self) -> &RuntimeHandle
Identity and endpoint of this connection.
Source§fn send_input<'life0, 'async_trait>(
&'life0 mut self,
input: RuntimeInput,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
fn send_input<'life0, 'async_trait>(
&'life0 mut self,
input: RuntimeInput,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
Submit structured user input and return the harness-native turn id when
one is allocated.
Source§fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessEvent>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessEvent>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
Wait for the next native live event.
Source§fn interrupt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
fn interrupt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
Interrupt the current turn, when supported.
Source§fn steer<'life0, 'async_trait>(
&'life0 mut self,
text: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
fn steer<'life0, 'async_trait>(
&'life0 mut self,
text: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
Redirect the current turn, when supported.
Source§fn respond<'life0, 'async_trait>(
&'life0 mut self,
request_id: Value,
response: Value,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
fn respond<'life0, 'async_trait>(
&'life0 mut self,
request_id: Value,
response: Value,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HostedHarnessConnection: 'async_trait,
Answer a server-initiated protocol request by its native JSON id.
Auto Trait Implementations§
impl !RefUnwindSafe for HostedHarnessConnection
impl !UnwindSafe for HostedHarnessConnection
impl Freeze for HostedHarnessConnection
impl Send for HostedHarnessConnection
impl Sync for HostedHarnessConnection
impl Unpin for HostedHarnessConnection
impl UnsafeUnpin for HostedHarnessConnection
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