Skip to content

Commit

Permalink
Add serialization to Did struct type (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe authored Oct 7, 2024
1 parent 4ce21ad commit 52bf9ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/web5/src/dids/did.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
use crate::errors::{Result, Web5Error};
use lazy_static::lazy_static;
use regex::Regex;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fmt;

/// A Decentralized Identifier (DID) is a globally unique identifier that does not require
/// a centralized registration authority. This struct provides a way to parse and handle Decentralized Identifier (DID) URIs
/// according to the W3C DID Core specification (https://www.w3.org/TR/did-core/).
#[derive(Debug, Clone, Default, PartialEq)]
#[derive(Deserialize, Serialize, Debug, Clone, Default, PartialEq)]
pub struct Did {
/// The complete DID URI.
pub uri: String,
Expand Down

0 comments on commit 52bf9ca

Please sign in to comment.