OpenAgentID documentation
Source referencesRust module referenceoas-did

oas-did · crate

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

Source: oas/oas/oas-did/src/lib.rs. SHA-256: 7d8654202dff400d34a4a1ee2e8293f14d046a389dd847b7781a7b627e945cf0.

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.

did

oas-did

DID parsing and validation for the Open Agent Specification (OAS).

This crate provides the [OasDid] type for parsing, validating, and representing did:oas decentralized identifiers as defined in OAS Specification §3.

Format

did:oas:<namespace>:<kind>:<identifier>

Entity Kinds

OAS defines 11 entity kinds (OAS Spec §4): hmr, mhr, ao, agent, agent:instance, tool, skill, workflow, model, dataset, service

Example

use oas_did::OasDid;
use std::str::FromStr;

let did = OasDid::from_str("did:oas:acme:agent:support-bot-42").unwrap();
assert_eq!(did.namespace(), "acme");
assert_eq!(did.identifier(), "support-bot-42");
assert!(!did.is_root());
pub mod did;

Source line: 32.

error

pub mod error;

Source line: 33.

kind

pub mod kind;

Source line: 34.

namespace

pub mod namespace;

Source line: 35.

validation

pub mod validation;

Source line: 36.

pub use did::OasDid;

pub use did::OasDid;

Source line: 38.

pub use error::DidError;

pub use error::DidError;

Source line: 39.

pub use kind::EntityKind;

pub use kind::EntityKind;

Source line: 40.

On this page