Skip to main content

CapabilitiesDocument

Struct CapabilitiesDocument 

Source
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: String

Protocol version this registry implements.

§registry_did: String

Registry’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: Limits

Resource limits.

§read_authentication_methods: Vec<String>

Read-authentication methods supported for non-public contexts.

§anonymous_public_reads: bool

Whether anonymous reads of public contexts are permitted.

§supports_idempotency_key: bool

Whether 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

Source

pub fn supports_discovery(&self) -> bool

Returns true if this registry supports keyword search.

Source

pub fn supports_federation(&self) -> bool

Returns true if this registry supports cross-registry resolution.

Source

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).

Source

pub fn supports_did_method(&self, method: &str) -> bool

Returns true if this registry can resolve the given DID method (e.g. "did:web").

Source

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.

Source

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

Source

pub fn claims_profile(&self, profile: Profile) -> bool

Returns true if the registry advertises the given profile.

Source

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

Source§

fn clone(&self) -> CapabilitiesDocument

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CapabilitiesDocument

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CapabilitiesDocument

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CapabilitiesDocument

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.