pub struct Style { /* private fields */ }Expand description
A normalized v3 document. Unknown declared extensions are preserved; inspect validation before execution.
Implementations§
Source§impl Style
impl Style
Sourcepub fn from_json(text: &str) -> Result<Self>
pub fn from_json(text: &str) -> Result<Self>
Parse with the embedded registry, preserving unknown declarations as incomplete.
§Errors
Returns JSON, budget, schema and static-semantic errors; use a custom
SchemaRegistry to register third-party schema resources.
Sourcepub fn from_value(value: Value) -> Result<Self>
pub fn from_value(value: Value) -> Result<Self>
Programmatic values take the same binary64, budget and validation path as raw JSON.
§Errors
Returns the serialization errors or the validation errors of Self::from_json.
Sourcepub fn validation(&self) -> &ValidationReport
pub fn validation(&self) -> &ValidationReport
Borrow the report snapshot captured when this immutable style was constructed. Later schema registrations do not update it; parse again to obtain a fresh report.
Sourcepub fn require_extension_support(&self, supported: &[&str]) -> Result<()>
pub fn require_extension_support(&self, supported: &[&str]) -> Result<()>
Execution support is independent of schema validity and uses exact versioned URLs.
§Errors
Returns E_SCHEMA_UNRESOLVED for incomplete validation and
E_UNSUPPORTED_EXTENSION when the executor’s list omits a declaration.
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
Transfer ownership of the normalized document, discarding the report snapshot.