pub trait OneShotClient: Send + Sync {
// Required method
fn submit<'life0, 'async_trait>(
&'life0 self,
request: OneShotRequest,
) -> Pin<Box<dyn Future<Output = Result<OneShotSubmission, OneShotError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Provider-neutral boundary for isolated structured agent prompts.
Implementations own transport selection, protocol repair, temporary app-server lifecycle, and usage aggregation so callers submit one request without selecting a CLI or app-server execution helper.
Required Methods§
Sourcefn submit<'life0, 'async_trait>(
&'life0 self,
request: OneShotRequest,
) -> Pin<Box<dyn Future<Output = Result<OneShotSubmission, OneShotError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit<'life0, 'async_trait>(
&'life0 self,
request: OneShotRequest,
) -> Pin<Box<dyn Future<Output = Result<OneShotSubmission, OneShotError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes one isolated prompt and returns its parsed response and usage.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".