Document

Struct Document 

Source
pub struct Document {
    pub context: Vec<Kind<Value>>,
    pub id: String,
    pub also_known_as: Option<Vec<String>>,
    pub controller: Option<Quota<String>>,
    pub service: Option<Vec<Service>>,
    pub verification_method: Option<Vec<VerificationMethod>>,
    pub authentication: Option<Vec<Kind<VerificationMethod>>>,
    pub assertion_method: Option<Vec<Kind<VerificationMethod>>>,
    pub key_agreement: Option<Vec<Kind<VerificationMethod>>>,
    pub capability_invocation: Option<Vec<Kind<VerificationMethod>>>,
    pub capability_delegation: Option<Vec<Kind<VerificationMethod>>>,
    pub did_document_metadata: Option<DocumentMetadata>,
}
Expand description

DID Document

Fields§

§context: Vec<Kind<Value>>

The context of the DID document.

§id: String

The DID for a particular DID subject.

The subject is defined as the entity identified by the DID and described by the DID document. Anything can be a DID subject: person, group, organization, physical thing, digital thing, logical thing, etc.

§also_known_as: Option<Vec<String>>

A set of URIs taht are other identifiers for the subject of the above DID.

§controller: Option<Quota<String>>

One or more strings that conform to the rules DID Syntax. The corresponding DID document(s) SHOULD contain verification relationships that explicitly permit the use of certain verification methods for specific purposes.

Any verification methods contained in the related DID documents SHOULD be accepted as authoritative, such that proofs that satisfy those verification methods are to be considered equivalent to proofs provided by the DID subject.

§service: Option<Vec<Service>>

A set of services, that express ways of communicating with the DID subject or related entities.

§verification_method: Option<Vec<VerificationMethod>>

If set, MUST be a set of verification methods for the DID subject.

§authentication: Option<Vec<Kind<VerificationMethod>>>

The authentication verification relationship is used to specify how the DID subject is expected to be authenticated, for purposes such as logging into a website or in any sort of challenge-response protocol.

https://www.w3.org/TR/did-core/#authentication

§assertion_method: Option<Vec<Kind<VerificationMethod>>>

The assertion_method verification relationship is used to specify how the DID subject is expected to express claims, such as for the purposes of issuing a Verifiable Credential.

https://www.w3.org/TR/did-core/#assertion

§key_agreement: Option<Vec<Kind<VerificationMethod>>>

The key_agreement verification relationship is used to specify how an entity can generate encryption material in order to transmit confidential information intended for the DID subject, such as for the purposes of establishing a secure communication channel with the recipient.

https://www.w3.org/TR/did-core/#key-agreement

§capability_invocation: Option<Vec<Kind<VerificationMethod>>>

The capability_invocation verification relationship is used to specify a verification method that might be used by the DID subject to invoke a cryptographic capability, such as the authorization to update the DID Document.

https://www.w3.org/TR/did-core/#capability-invocation

§capability_delegation: Option<Vec<Kind<VerificationMethod>>>

The capability_delegation verification relationship is used to specify a mechanism that might be used by the DID subject to delegate a cryptographic capability to another party, such as delegating the authority to access a specific HTTP API to a subordinate.

https://www.w3.org/TR/did-core/#capability-delegation

§did_document_metadata: Option<DocumentMetadata>

If resolution is successful, this MUST be metadata about the DID document. This typically does not change between invocations of the resolve and resolveRepresentation functions unless the DID document changes. If resolution is unsuccessful, this output MUST be an empty.

https://w3c.github.io/did-core/#dfn-diddocumentmetadata

Trait Implementations§

Source§

impl Clone for Document

Source§

fn clone(&self) -> Document

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Document

Source§

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

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

impl Default for Document

Source§

fn default() -> Document

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Document

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 PartialEq for Document

Source§

fn eq(&self, other: &Document) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Document

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
Source§

impl Eq for Document

Source§

impl StructuralPartialEq for Document

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,