Trait AiJsonTemplateWithJustification

Source
pub trait AiJsonTemplateWithJustification: AiJsonTemplate {
    // Required method
    fn to_template_with_justification() -> Value;
}
Expand description

Extended trait that demands both a normal AiJsonTemplate and a ...Justification structure for nested usage.

Required Methods§

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.

Implementations on Foreign Types§

Source§

impl<K, V> AiJsonTemplateWithJustification for HashMap<K, V>
where K: Send + Sync + AiJsonTemplate + Eq + Hash + 'static, V: Send + Sync + AiJsonTemplate + 'static,

Similarly, we provide AiJsonTemplateWithJustification for HashMap<K, V>, requiring that K and V each implement AiJsonTemplateWithJustification.

Source§

impl<T> AiJsonTemplateWithJustification for Vec<T>
where T: Send + Sync + AiJsonTemplateWithJustification + 'static,

Blanket impl for Vec<T> if T: AiJsonTemplateWithJustification.

We add "has_justification": true at the array level, but again, we do not require or encourage justifying each element individually. Instead, we have a single top-level justification/confidence for the entire vector.

Implementors§