pub trait OpenAiSerializable: Sized {
// Required method
fn openai_output_schema() -> Value;
// Provided methods
fn to_openai_value(&self) -> Result<Value>
where Self: Serialize { ... }
fn from_openai_value(value: Value) -> Result<Self>
where Self: DeserializeOwned { ... }
}Required Methods§
fn openai_output_schema() -> Value
Provided Methods§
fn to_openai_value(&self) -> Result<Value>where
Self: Serialize,
fn from_openai_value(value: Value) -> Result<Self>where
Self: DeserializeOwned,
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.