Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serialization to Did struct type #382

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading