OpenAgentID documentation
Source referencesRust module referenceoas-document

oas-document · conformance

Declared module signatures, types, configuration, and source documentation.

Source: oas/oas/oas-document/src/conformance.rs. SHA-256: 4af11df070193dee1ef0d8e327a75debbdee373a6fc557a144f7e229e892cf65.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

conformance::ConformanceLevel

OAS conformance levels as defined in OAS Specification §10.

  • L0: Basic Identity — valid document, signature, and kind
  • L1: Accountable Identity — L0 + valid lineage to human root
  • L2: Full Identity — L1 + immutable ledger anchoring + third-party attestation

Examples

use oas_document::conformance::ConformanceLevel;
use std::str::FromStr;

let level = ConformanceLevel::from_str("L1").unwrap();
assert!(level >= ConformanceLevel::L0);
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub enum ConformanceLevel {
    /// Level 0 — Basic Identity (OAS Spec §10.1).
    L0,
    /// Level 1 — Accountable Identity (OAS Spec §10.2).
    L1,
    /// Level 2 — Full Identity (OAS Spec §10.3).
    L2,
}

Source line: 25.

conformance::ConformanceLevel::as_str

Returns the string representation.

pub fn as_str(&self) -> &'static str;

Source line: 36.

On this page