Skip to main content

CacheProvider

Trait CacheProvider 

Source
pub trait CacheProvider<Ctx>: Send + Sync {
    // Provided methods
    fn get_json(_ctx: &Ctx, _tool_name: &str, _args: &Value) -> Option<Value> { ... }
    fn put_json(_ctx: &Ctx, _tool_name: &str, _args: &Value, _result: &Value) { ... }
    fn get_dual(
        _ctx: &Ctx,
        _tool_name: &str,
        _args: &Value,
    ) -> Option<SplitToolResult> { ... }
    fn put_dual(
        _ctx: &Ctx,
        _tool_name: &str,
        _args: &Value,
        _result: &SplitToolResult,
    ) { ... }
}
Expand description

Provider trait for cached tool results.

Provided Methods§

Source

fn get_json(_ctx: &Ctx, _tool_name: &str, _args: &Value) -> Option<Value>

Source

fn put_json(_ctx: &Ctx, _tool_name: &str, _args: &Value, _result: &Value)

Source

fn get_dual( _ctx: &Ctx, _tool_name: &str, _args: &Value, ) -> Option<SplitToolResult>

Source

fn put_dual( _ctx: &Ctx, _tool_name: &str, _args: &Value, _result: &SplitToolResult, )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§