#[non_exhaustive]pub struct DocumentMetadata {
pub created: Option<String>,
pub updated: Option<String>,
pub deactivated: Option<bool>,
pub next_update: Option<String>,
pub version_id: Option<String>,
pub next_version_id: Option<String>,
pub equivalent_id: Vec<Did>,
pub canonical_id: Option<Did>,
pub properties: IndexMap<String, Value>,
}Expand description
Metadata about the DID document (DID Core §7.1.3 “DID document metadata”).
Timestamps are XML Datetime strings in UTC without fractional seconds, as DID Core requires,
for example 2020-12-20T19:17:47Z; this layer carries them as strings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.created: Option<String>When the DID was created.
updated: Option<String>When the resolved version was written.
deactivated: Option<bool>Whether the DID has been deactivated.
next_update: Option<String>When the next version was written, if the resolved version is not the latest.
version_id: Option<String>The version of the resolved document.
next_version_id: Option<String>The version after the resolved one, if any.
equivalent_id: Vec<Did>DIDs the method defines as logically equivalent to the resolved one.
canonical_id: Option<Did>The DID the method defines as canonical for the resolved one.
properties: IndexMap<String, Value>Every other property, in insertion order.
Implementations§
Source§impl DocumentMetadata
impl DocumentMetadata
Sourcepub fn is_deactivated(&self) -> bool
pub fn is_deactivated(&self) -> bool
Whether the DID is deactivated.
Trait Implementations§
Source§impl Clone for DocumentMetadata
impl Clone for DocumentMetadata
Source§impl Debug for DocumentMetadata
impl Debug for DocumentMetadata
Source§impl Default for DocumentMetadata
impl Default for DocumentMetadata
Source§impl<'de> Deserialize<'de> for DocumentMetadata
impl<'de> Deserialize<'de> for DocumentMetadata
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 DocumentMetadata
Source§impl PartialEq for DocumentMetadata
impl PartialEq for DocumentMetadata
Source§impl Serialize for DocumentMetadata
impl Serialize for DocumentMetadata
impl StructuralPartialEq for DocumentMetadata
Auto Trait Implementations§
impl Freeze for DocumentMetadata
impl RefUnwindSafe for DocumentMetadata
impl Send for DocumentMetadata
impl Sync for DocumentMetadata
impl Unpin for DocumentMetadata
impl UnsafeUnpin for DocumentMetadata
impl UnwindSafe for DocumentMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.