#[non_exhaustive]pub struct ResolutionMetadata {
pub content_type: Option<String>,
pub error: Option<ResolutionError>,
pub properties: IndexMap<String, Value>,
}Expand description
Metadata about the resolution process (DID Core §7.1.3 “DID resolution metadata”).
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.content_type: Option<String>The media type of the returned document.
error: Option<ResolutionError>Why resolution failed. Only the keyword is serialized; the detail and source of the error are kept in memory, for the caller of the resolver.
properties: IndexMap<String, Value>Every other property, in insertion order.
Implementations§
Source§impl ResolutionMetadata
impl ResolutionMetadata
Sourcepub fn error(error: impl Into<ResolutionError>) -> Self
pub fn error(error: impl Into<ResolutionError>) -> Self
Metadata reporting error, a ResolutionError or a bare ResolutionErrorKind.
Sourcepub fn content_type(media_type: impl Into<String>) -> Self
pub fn content_type(media_type: impl Into<String>) -> Self
Metadata reporting content_type.
Trait Implementations§
Source§impl Clone for ResolutionMetadata
impl Clone for ResolutionMetadata
Source§impl Debug for ResolutionMetadata
impl Debug for ResolutionMetadata
Source§impl Default for ResolutionMetadata
impl Default for ResolutionMetadata
Source§impl<'de> Deserialize<'de> for ResolutionMetadata
impl<'de> Deserialize<'de> for ResolutionMetadata
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 ResolutionMetadata
Source§impl PartialEq for ResolutionMetadata
impl PartialEq for ResolutionMetadata
Source§impl Serialize for ResolutionMetadata
impl Serialize for ResolutionMetadata
impl StructuralPartialEq for ResolutionMetadata
Auto Trait Implementations§
impl !RefUnwindSafe for ResolutionMetadata
impl !UnwindSafe for ResolutionMetadata
impl Freeze for ResolutionMetadata
impl Send for ResolutionMetadata
impl Sync for ResolutionMetadata
impl Unpin for ResolutionMetadata
impl UnsafeUnpin for ResolutionMetadata
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.