pub struct ScriptContributions {
pub blocks: Vec<RegisteredBlock>,
pub variables: Vec<(String, VariableProvider, BlockOrigin)>,
pub assembly_hooks: Vec<(Arc<dyn AssemblyHook>, Authority)>,
pub async_assembly_hooks: Vec<(Arc<dyn AsyncAssemblyHook>, Authority)>,
}Expand description
Expand {{name}} for every registered variable.
Deliberately not a template language. An unregistered placeholder is left
exactly as written — a prompt that contains {{ for its own reasons must
come out unchanged, and a variable that failed to resolve should be visible
rather than silently blank.
What the QuickJS layer contributes to the prompt, fixed when the session
is built.
Fields§
§blocks: Vec<RegisteredBlock>§variables: Vec<(String, VariableProvider, BlockOrigin)>§assembly_hooks: Vec<(Arc<dyn AssemblyHook>, Authority)>§async_assembly_hooks: Vec<(Arc<dyn AsyncAssemblyHook>, Authority)>Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ScriptContributions
impl !UnwindSafe for ScriptContributions
impl Forget for ScriptContributions
impl Freeze for ScriptContributionswhere
*const u8 is !null: Freeze,
PhantomData<RegisteredBlock>: Freeze,
PhantomData<(String, Arc<dyn for<'a> Fn(&ScenePromptContext<'a>) -> Option<String> + Send + Sync>, BlockOrigin)>: Freeze,
PhantomData<(Arc<dyn AssemblyHook>, Authority)>: Freeze,
PhantomData<(Arc<dyn AsyncAssemblyHook>, Authority)>: Freeze,
impl Move for ScriptContributions
impl Send for ScriptContributions
impl Sync for ScriptContributions
impl Unpin for ScriptContributions
impl UnsafeUnpin for ScriptContributionswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<RegisteredBlock>: UnsafeUnpin,
PhantomData<(String, Arc<dyn for<'a> Fn(&ScenePromptContext<'a>) -> Option<String> + Send + Sync>, BlockOrigin)>: UnsafeUnpin,
PhantomData<(Arc<dyn AssemblyHook>, Authority)>: UnsafeUnpin,
PhantomData<(Arc<dyn AsyncAssemblyHook>, Authority)>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more