pub struct ToolRpc { /* private fields */ }Implementations§
Source§impl ToolRpc
impl ToolRpc
Sourcepub async fn invoke_and_await(
&self,
command_path: Vec<String>,
input: TypedSchemaValue,
stdin: Option<ToolStdin>,
stdout: Option<ToolOutput>,
stderr: Option<ToolOutput>,
) -> Result<InvocationResult, ToolRpcError>
pub async fn invoke_and_await( &self, command_path: Vec<String>, input: TypedSchemaValue, stdin: Option<ToolStdin>, stdout: Option<ToolOutput>, stderr: Option<ToolOutput>, ) -> Result<InvocationResult, ToolRpcError>
Waits for the structured terminal. Callers that supplied stdout or
stderr must drive this wait and every already-created reader
concurrently. Callers that manually created an open stdin must likewise
drive its writer concurrently; see create-stdin.
Source§impl ToolRpc
impl ToolRpc
Sourcepub fn invoke(
&self,
command_path: &[String],
input: TypedSchemaValue,
stdin: Option<ToolStdin>,
) -> Result<(), ToolRpcError>
pub fn invoke( &self, command_path: &[String], input: TypedSchemaValue, stdin: Option<ToolStdin>, ) -> Result<(), ToolRpcError>
Durably admits fire-and-forget work. Declared output is discarded by the host so an absent caller reader cannot apply backpressure.
Source§impl ToolRpc
impl ToolRpc
Sourcepub fn async_invoke_and_await(
&self,
command_path: &[String],
input: TypedSchemaValue,
stdin: Option<ToolStdin>,
stdout: Option<ToolOutput>,
stderr: Option<ToolOutput>,
) -> FutureInvokeResult
pub fn async_invoke_and_await( &self, command_path: &[String], input: TypedSchemaValue, stdin: Option<ToolStdin>, stdout: Option<ToolOutput>, stderr: Option<ToolOutput>, ) -> FutureInvokeResult
Durably admits work and returns an independently owned structured result observer. Each requested output was created by the caller and is observed independently from this future.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ToolRpc
impl RefUnwindSafe for ToolRpc
impl Send for ToolRpc
impl Sync for ToolRpc
impl Unpin for ToolRpc
impl UnsafeUnpin for ToolRpc
impl UnwindSafe for ToolRpc
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