pub struct Document {
pub id: Did,
pub also_known_as: Option<Vec<String>>,
pub controller: Option<Vec<Did>>,
pub verification_method: Option<Vec<VerificationMethodMap>>,
pub authentication: Option<Vec<VerificationMethod>>,
pub assertion_method: Option<Vec<VerificationMethod>>,
pub key_agreement: Option<Vec<VerificationMethod>>,
pub capability_invocation: Option<Vec<VerificationMethod>>,
pub capability_delegation: Option<Vec<VerificationMethod>>,
pub service: Option<Vec<ServiceEndpoint>>,
}Fields§
§id: Did§also_known_as: Option<Vec<String>>§controller: Option<Vec<Did>>§verification_method: Option<Vec<VerificationMethodMap>>§authentication: Option<Vec<VerificationMethod>>§assertion_method: Option<Vec<VerificationMethod>>§key_agreement: Option<Vec<VerificationMethod>>§capability_invocation: Option<Vec<VerificationMethod>>§capability_delegation: Option<Vec<VerificationMethod>>§service: Option<Vec<ServiceEndpoint>>Implementations§
Source§impl Document
impl Document
Sourcepub fn resolve_verification_method_url(
&self,
url: &DidUrl,
role: VerificationRole,
) -> Option<VerificationMethodMap>
pub fn resolve_verification_method_url( &self, url: &DidUrl, role: VerificationRole, ) -> Option<VerificationMethodMap>
Returns the verification method that the provided DidUrl is
referencing, restricted to a given VerificationRole.
Sourcepub fn resolve_verification_method(
&self,
method: &VerificationMethod,
) -> Option<VerificationMethodMap>
pub fn resolve_verification_method( &self, method: &VerificationMethod, ) -> Option<VerificationMethodMap>
Resolves a VerificationMethod to its VerificationMethodMap.
For embedded maps, returns the map directly. For URL references,
resolves them against this document’s verification_method array.
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 Eq for Document
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more