pub struct StdLib;
Expand description
Standard library function implementations
Implementations§
Source§impl StdLib
impl StdLib
Sourcepub fn dispatch(
&self,
func_name: &str,
args: &[JsonnetValue],
) -> Result<JsonnetValue>
pub fn dispatch( &self, func_name: &str, args: &[JsonnetValue], ) -> Result<JsonnetValue>
Dispatches a standard library function call.
Sourcepub fn ai_http_get(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn ai_http_get(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
ai.httpGet(url, headers?) - HTTP GET request
Sourcepub fn ai_http_post(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn ai_http_post(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
ai.httpPost(url, body, headers?) - HTTP POST request
Sourcepub fn ai_call_model(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn ai_call_model(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
ai.callModel(model, prompt, options?) - Call AI model
Sourcepub fn tool_execute(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn tool_execute(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
tool.execute(name, args) - Execute external tool
Sourcepub fn memory_get(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn memory_get(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
memory.get(key) - Get value from memory
Sourcepub fn memory_set(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn memory_set(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
memory.set(key, value) - Set value in memory
Sourcepub fn agent_create(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn agent_create(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
agent.create(config) - Create AI agent
Sourcepub fn std_ext_var(&self, args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn std_ext_var(&self, args: Vec<JsonnetValue>) -> Result<JsonnetValue>
std.extVar(name) - Get external variable
Sourcepub fn std_manifest_json(&self, args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn std_manifest_json(&self, args: Vec<JsonnetValue>) -> Result<JsonnetValue>
std.manifestJson(value, indent?) - JSON manifest with optional indentation
Sourcepub fn length(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
pub fn length(args: Vec<JsonnetValue>) -> Result<JsonnetValue>
std.length(x) - returns length of array, string, or object
Sourcepub fn call_function(
name: &str,
args: Vec<JsonnetValue>,
) -> Result<JsonnetValue>
pub fn call_function( name: &str, args: Vec<JsonnetValue>, ) -> Result<JsonnetValue>
Call a standard library function (static method)
Auto Trait Implementations§
impl Freeze for StdLib
impl RefUnwindSafe for StdLib
impl Send for StdLib
impl Sync for StdLib
impl Unpin for StdLib
impl UnwindSafe for StdLib
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