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§
Sourcefn definition(&self) -> PromptDefinition
fn definition(&self) -> PromptDefinition
Return the prompt definition.
Sourcefn render_erased(&self, args: Value) -> BoxPromptFuture<'_>
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".