Skip to main content

SdkPromptSource

Trait SdkPromptSource 

Source
pub trait SdkPromptSource: Send + Sync {
    // Required methods
    fn render<'life0, 'async_trait>(
        &'life0 self,
        args: BTreeMap<String, String>,
    ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn arg_names(&self) -> &[String];
}
Expand description

Renderable prompt source configured on an SDK emulation component.

MCP implements this seam, but the SDK does not depend on MCP transport or client types, so removing the MCP adapter leaves runtime semantics intact.

Required Methods§

Source

fn render<'life0, 'async_trait>( &'life0 self, args: BTreeMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Render one prompt with its named arguments.

Source

fn arg_names(&self) -> &[String]

Declared argument names in stable source order.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§