OpenAgentID documentation
Source referencesRust module referenceopenagent-skills-policy

openagent-skills-policy · did

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

Source: openagent-sdk/crates/openagent-skills-policy/rust/src/did.rs. SHA-256: c2b2af023a2d408322f60d815ccb05d1c39ed16728e03f7b612556db5fe37669.

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::Did

A Decentralized Identifier (DID) that identifies the agent a policy applies to.

Format: did:<method>:<method-specific-id>. For L1fe agents this is typically did:oas:l1fe:agent:<id>.

#[derive(Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(transparent)]
pub struct Did(String);

Source line: 28.

did::Did::new

Create a new DID with validation.

Errors

Returns [SkillsPolicyError::InvalidPolicy] if the input does not look like a DID.

pub fn new(input: impl Into<String>) -> Result<Self, SkillsPolicyError>;

Source line: 36.

did::Did::as_str

Return the raw DID string.

#[must_use]
pub fn as_str(&self) -> &str;

Source line: 44.

On this page