pub struct CapabilitiesDocument {
pub acdp_version: String,
pub registry_did: String,
pub supported_signature_algorithms: Vec<String>,
pub supported_did_methods: Vec<String>,
pub profiles: Vec<String>,
pub limits: Limits,
pub read_authentication_methods: Vec<String>,
pub anonymous_public_reads: bool,
pub supports_idempotency_key: bool,
pub extensions: Map<String, Value>,
}Expand description
Registry capabilities document served at GET /.well-known/acdp.json.
additionalProperties is true in the schema so future versions can add
capability flags without a schema bump. Unknown fields are preserved in
Self::extensions for forward-compatible inspection.
Fields§
§acdp_version: StringProtocol version this registry implements.
registry_did: StringRegistry’s Decentralized Identifier (did:web:…).
supported_signature_algorithms: Vec<String>Signature algorithms accepted on publish. MUST contain "ed25519".
supported_did_methods: Vec<String>DID methods the registry can resolve. MUST contain "did:web".
profiles: Vec<String>Profile(s) this registry claims. MUST contain "acdp-registry-core".
limits: LimitsResource limits.
read_authentication_methods: Vec<String>Read-authentication methods supported for non-public contexts.
anonymous_public_reads: boolWhether anonymous reads of public contexts are permitted.
supports_idempotency_key: boolWhether Idempotency-Key is honoured on POST /contexts.
extensions: Map<String, Value>Forward-compatible extensions: any unknown top-level field appears here verbatim.
Implementations§
Source§impl CapabilitiesDocument
impl CapabilitiesDocument
Sourcepub fn supports_discovery(&self) -> bool
pub fn supports_discovery(&self) -> bool
Returns true if this registry supports keyword search.
Sourcepub fn supports_federation(&self) -> bool
pub fn supports_federation(&self) -> bool
Returns true if this registry supports cross-registry resolution.
Sourcepub fn supports_algorithm(&self, algorithm: &str) -> bool
pub fn supports_algorithm(&self, algorithm: &str) -> bool
Returns true if this registry advertises support for the given
signature algorithm (case-sensitive match against
supported_signature_algorithms).
Sourcepub fn supports_did_method(&self, method: &str) -> bool
pub fn supports_did_method(&self, method: &str) -> bool
Returns true if this registry can resolve the given DID method
(e.g. "did:web").
Sourcepub fn idempotency_ttl(&self) -> Option<Duration>
pub fn idempotency_ttl(&self) -> Option<Duration>
Idempotency-key TTL as a std::time::Duration, if the registry
advertises one. Returns None when supports_idempotency_key is
false or the TTL field is absent.
Sourcepub fn requires_anonymous_auth(&self) -> bool
pub fn requires_anonymous_auth(&self) -> bool
Returns true when the registry requires authenticated requests
even for visibility: public reads (i.e. anonymous_public_reads
is false).
Source§impl CapabilitiesDocument
impl CapabilitiesDocument
Sourcepub fn claims_profile(&self, profile: Profile) -> bool
pub fn claims_profile(&self, profile: Profile) -> bool
Returns true if the registry advertises the given profile.
Sourcepub fn supports_required(&self, required: &[Profile]) -> Result<(), AcdpError>
pub fn supports_required(&self, required: &[Profile]) -> Result<(), AcdpError>
Returns Ok(()) if the registry advertises every profile in
required. Returns the first missing profile in
acdp_primitives::error::AcdpError::SchemaViolation otherwise.
Trait Implementations§
Source§impl Clone for CapabilitiesDocument
impl Clone for CapabilitiesDocument
Source§fn clone(&self) -> CapabilitiesDocument
fn clone(&self) -> CapabilitiesDocument
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more