Skip to main content

ErasedPrompt

Trait ErasedPrompt 

Source
pub trait ErasedPrompt: Send + Sync {
    // Required methods
    fn definition(&self) -> PromptDefinition;
    fn render_erased(&self, args: Value) -> BoxPromptFuture<'_>;
}
Expand description

Type-erased wrapper enabling heterogeneous prompt storage.

Required Methods§

Source

fn definition(&self) -> PromptDefinition

Return the prompt definition.

Source

fn render_erased(&self, args: Value) -> BoxPromptFuture<'_>

Deserialize arguments and render the prompt template.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§