pub struct DidResolutionMetadata {
pub content_type: Option<String>,
pub error: Option<DidResolutionError>,
pub error_message: Option<String>,
}Expand description
Metadata about the DID resolution process itself.
Per W3C DID Core §7.1.2, this is returned alongside every resolution
attempt — including failed ones (where error is set).
Fields§
§content_type: Option<String>Media type of the returned representation (application/did+ld+json).
MUST be present when resolution succeeds.
error: Option<DidResolutionError>Error code if resolution failed. None when resolution succeeded.
error_message: Option<String>Human-readable error message (non-normative, for debugging).
Implementations§
Source§impl DidResolutionMetadata
impl DidResolutionMetadata
Sourcepub fn success() -> DidResolutionMetadata
pub fn success() -> DidResolutionMetadata
Build metadata for a successful resolution.
Sourcepub fn error(
code: DidResolutionError,
message: impl Into<String>,
) -> DidResolutionMetadata
pub fn error( code: DidResolutionError, message: impl Into<String>, ) -> DidResolutionMetadata
Build metadata for a failed resolution.
Trait Implementations§
Source§impl Clone for DidResolutionMetadata
impl Clone for DidResolutionMetadata
Source§fn clone(&self) -> DidResolutionMetadata
fn clone(&self) -> DidResolutionMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DidResolutionMetadata
impl Debug for DidResolutionMetadata
Source§impl Default for DidResolutionMetadata
impl Default for DidResolutionMetadata
Source§fn default() -> DidResolutionMetadata
fn default() -> DidResolutionMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DidResolutionMetadata
impl<'de> Deserialize<'de> for DidResolutionMetadata
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DidResolutionMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DidResolutionMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DidResolutionMetadata
impl PartialEq for DidResolutionMetadata
Source§impl Serialize for DidResolutionMetadata
impl Serialize for DidResolutionMetadata
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DidResolutionMetadata
Auto Trait Implementations§
impl Freeze for DidResolutionMetadata
impl RefUnwindSafe for DidResolutionMetadata
impl Send for DidResolutionMetadata
impl Sync for DidResolutionMetadata
impl Unpin for DidResolutionMetadata
impl UnwindSafe for DidResolutionMetadata
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