pub trait LLMData:
Validate
+ Serialize
+ DeserializeOwned
+ Sized {
// Provided methods
fn parse(input: &str) -> LlmJsonParseResult<Self> { ... }
fn stringify(&self) -> Result<String, Error> { ... }
}Expand description
Trait for Serde-powered LLM data parsing/validation/stringification.
Provided Methods§
Sourcefn parse(input: &str) -> LlmJsonParseResult<Self>
fn parse(input: &str) -> LlmJsonParseResult<Self>
Parse raw LLM output using rustia’s lenient JSON parser and then validate the shape through serde deserialization.
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.