pub trait AiJsonTemplate:
Clone
+ Debug
+ LoadFromFile
+ SaveToFile<Error = SaveLoadError>
+ Serialize
+ for<'a> Deserialize<'a> {
// Required method
fn to_template() -> Value;
}
Expand description
The derived code implements AiJsonTemplate
for each struct, letting you
call MyStruct::to_template()
to get a JSON “schema” describing how the
AI should produce data that matches this layout.
Required Methods§
Sourcefn to_template() -> Value
fn to_template() -> Value
Return a JSON template describing how the AI’s output should be structured. This might include doc comments or other instructions for each field.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.