oas-document · relationships
Declared module signatures, types, configuration, and source documentation.
Source: oas/oas/oas-document/src/relationships.rs. SHA-256: 1f1695557c49d5b9ef6d901b860b2b3d27a4d6036ba1b039a349ccdebd4e9b80.
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.
relationships::Affiliation
A relationship to another OAS entity.
Examples
use oas_document::relationships::Affiliation;
let aff = Affiliation {
did: "did:oas:prod:ao:research-team".to_string(),
relationship: "member".to_string(),
label: Some("Research Team".to_string()),
};#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Affiliation {
/// DID of the related entity.
pub did: String,
/// Relationship type: `"member"`, `"partner"`, `"subsidiary"`,
/// `"affiliate"`, `"delegate"`, `"advisor"`.
pub relationship: String,
/// Human-readable label for this affiliation.
#[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>
}Source line: 26.
relationships::RelationshipsSection
Relationships and affiliations section of an OAS Identity Document.
Examples
use oas_document::relationships::{RelationshipsSection, Affiliation};
let rels = RelationshipsSection {
parent_organization: Some("did:oas:prod:enr:acme-corp".to_string()),
affiliations: vec![
Affiliation {
did: "did:oas:prod:ao:ai-lab".to_string(),
relationship: "member".to_string(),
label: Some("AI Research Lab".to_string()),
},
],
blocked_dids: vec![],
};
assert!(rels.parent_organization.is_some());#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RelationshipsSection {
/// DID of the parent organization (ENR or AO).
/// Distinct from lineage `creator_did` — this is an organizational
/// relationship, not a derivation chain link.
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_organization: Option<String>,
/// Voluntary affiliations (teams, partnerships, memberships).
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub affiliations: Vec<Affiliation>,
/// DIDs that this entity refuses to interact with.
/// Stored as public assertions to enable pre-flight checks.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub blocked_dids: Vec<String>
}Source line: 61.
relationships::relationship_types
Standard relationship types.
pub mod relationship_types;Source line: 79.
relationships::relationship_types::MEMBER
pub const MEMBER: &str;Source line: 80.
relationships::relationship_types::PARTNER
pub const PARTNER: &str;Source line: 81.
relationships::relationship_types::SUBSIDIARY
pub const SUBSIDIARY: &str;Source line: 82.
relationships::relationship_types::AFFILIATE
pub const AFFILIATE: &str;Source line: 83.
relationships::relationship_types::DELEGATE
pub const DELEGATE: &str;Source line: 84.
relationships::relationship_types::ADVISOR
pub const ADVISOR: &str;Source line: 85.