pub trait AsyncAssemblyHook: Send + Sync {
// Required method
fn on_assemble_async<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
assembly: &'life1 mut PromptAssembly,
ctx: &'life2 ScenePromptContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
A pass over the assembled prompt that has to await something.
The synchronous AssemblyHook is the common case and stays
synchronous — a Rust hook that only rearranges strings should not be an
async function for the sake of the one backend that needs to be. This is
the variant a script carrier implements, since running the operator’s code
means awaiting an engine.
Required Methods§
fn on_assemble_async<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
assembly: &'life1 mut PromptAssembly,
ctx: &'life2 ScenePromptContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".