OpenAgentID documentation
Source referencesRust module referenceoas-resolve

oas-resolve · metadata

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

Source: oas/oas/oas-resolve/src/metadata.rs. SHA-256: a1a4521862aef723f58382875693766297e92801f5431959f97740539dbe70a5.

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.

metadata::ResolutionMetadata

Metadata about the resolution process itself.

Corresponds to the didResolutionMetadata field in OAS Spec §12.3.

Examples

use oas_resolve::metadata::ResolutionMetadata;

let meta = ResolutionMetadata {
    content_type: "application/did+ld+json".to_string(),
    retrieved: "2026-01-15T12:00:00Z".to_string(),
    resolver_identity: None,
};
assert_eq!(meta.content_type, "application/did+ld+json");
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ResolutionMetadata {
/// The content type of the resolved document.

pub content_type: String,
/// ISO 8601 timestamp of when the resolution occurred.

pub retrieved: String,
/// DID of the resolver that performed the resolution (optional).

#[serde(skip_serializing_if = "Option::is_none")]
pub resolver_identity: Option<String>
}

Source line: 28.

metadata::DocumentResolutionMetadata

Metadata about the resolved document.

Corresponds to the didDocumentMetadata field in OAS Spec §12.3.

Examples

use oas_resolve::metadata::DocumentResolutionMetadata;

let meta = DocumentResolutionMetadata {
    created: "2026-01-15T00:00:00Z".to_string(),
    updated: None,
    version_id: Some("3".to_string()),
    lineage_verified: Some(true),
    human_root_active: Some(true),
    conformance_level: Some("L2".to_string()),
    attestation_count: Some(5),
};
assert!(meta.lineage_verified.unwrap_or(false));
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DocumentResolutionMetadata {
/// ISO 8601 creation timestamp of the document.

pub created: String,
/// ISO 8601 last update timestamp (if any).

#[serde(skip_serializing_if = "Option::is_none")]
pub updated: Option<String>,
/// Version identifier (typically the sequence number as a string).

#[serde(skip_serializing_if = "Option::is_none")]
pub version_id: Option<String>,
/// Whether the lineage chain was verified during resolution.

#[serde(skip_serializing_if = "Option::is_none")]
pub lineage_verified: Option<bool>,
/// Whether the human root entity is active (not revoked).

#[serde(skip_serializing_if = "Option::is_none")]
pub human_root_active: Option<bool>,
/// The conformance level of the resolved document.

#[serde(skip_serializing_if = "Option::is_none")]
pub conformance_level: Option<String>,
/// Number of attestations associated with this entity.

#[serde(skip_serializing_if = "Option::is_none")]
pub attestation_count: Option<u32>
}

Source line: 72.

metadata::ResolutionResult

A complete resolution result combining document, resolution metadata, and document metadata.

Implements the full resolution response structure from OAS Spec §12.3.

Examples

use oas_resolve::metadata::{ResolutionResult, ResolutionMetadata, DocumentResolutionMetadata};
use oas_document::OasDocument;

// ResolutionResult is returned by resolver implementations
#[derive(Debug, Clone)]
pub struct ResolutionResult {
/// The resolved identity document.

pub document: oas_document::OasDocument,
/// Metadata about the resolution process.

pub resolution_metadata: ResolutionMetadata,
/// Metadata about the resolved document.

pub document_metadata: DocumentResolutionMetadata
}

Source line: 115.

On this page