pub struct Document {Show 13 fields
pub context: Context,
pub id: String,
pub controller: Option<Controller>,
pub also_known_as: Option<Vec<String>>,
pub verification_method: Option<Vec<VerificationMethod>>,
pub authentication: Option<Vec<VerificationMethodType>>,
pub assertion_method: Option<Vec<VerificationMethodType>>,
pub capability_delegation: Option<Vec<VerificationMethodType>>,
pub capability_invocation: Option<Vec<VerificationMethodType>>,
pub key_agreement: Option<Vec<VerificationMethodType>>,
pub service: Option<Vec<Service>>,
pub additional_properties: Option<HashMap<String, Value>>,
pub proof: Option<Proofs>,
}Expand description
Represents a DID Document according to the DID Core specification.
Fields§
§context: Context§id: String§controller: Option<Controller>§also_known_as: Option<Vec<String>>§verification_method: Option<Vec<VerificationMethod>>§authentication: Option<Vec<VerificationMethodType>>§assertion_method: Option<Vec<VerificationMethodType>>§capability_delegation: Option<Vec<VerificationMethodType>>§capability_invocation: Option<Vec<VerificationMethodType>>§key_agreement: Option<Vec<VerificationMethodType>>§service: Option<Vec<Service>>§additional_properties: Option<HashMap<String, Value>>§proof: Option<Proofs>Implementations§
Source§impl Document
impl Document
Sourcepub fn new_full(
context: Context,
id: String,
authentication: Option<Vec<VerificationMethodType>>,
assertion_method: Option<Vec<VerificationMethodType>>,
key_agreement: Option<Vec<VerificationMethodType>>,
verification_method: Option<Vec<VerificationMethod>>,
service: Option<Vec<Service>>,
) -> Self
pub fn new_full( context: Context, id: String, authentication: Option<Vec<VerificationMethodType>>, assertion_method: Option<Vec<VerificationMethodType>>, key_agreement: Option<Vec<VerificationMethodType>>, verification_method: Option<Vec<VerificationMethod>>, service: Option<Vec<Service>>, ) -> Self
Creates a new Document instance with frequent members.
§Arguments
context- The context defining the vocabulary for the document.id- A unique identifier for the DID document.authentication- An optional vector ofAuthenticationmethods.assertion_method- An optional vector ofAssertionMethodmethods.key_agreement- An optional vector ofKeyAgreementmethods.verification_method- An optional vector ofVerificationMethodmethods.service- An optional vector ofServiceinstances.
§Returns
- A new instance of
Document.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more