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 ScriptContributions
impl Move for ScriptContributions
impl Send for ScriptContributions
impl Sync for ScriptContributions
impl Unpin for ScriptContributions
impl UnsafeUnpin for ScriptContributions
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