Skip to main content

read_certificate

Function read_certificate 

Source
pub fn read_certificate(json: &str) -> Result<AnyCertificate, EnvironmentError>
Expand description

Read a certificate of any kind from JSON.

The kind is decided by the document’s own shape: an object with a schema field is a versioned certificate and must name a schema this checker implements; otherwise a theorem field marks a TheoremCertificate and its absence a bare Certificate. Every struct refuses unknown fields, so a theorem certificate can no longer be silently read as a bare one with its environment dropped. The prelude tag is checked here, before anything is re-checked.