| Crates.io | did_url_parser |
| lib.rs | did_url_parser |
| version | 0.3.0 |
| created_at | 2024-03-26 16:39:52.125377+00 |
| updated_at | 2025-01-06 08:45:31.509453+00 |
| description | A no_std parser for Decentralized Identifiers (DIDs) |
| homepage | |
| repository | https://github.com/iotaledger/did_url |
| max_upload_size | |
| id | 1186705 |
| size | 53,942 |
A parser for Decentralized Identifiers (DIDs)
A fork of l1h3r/did_url.
use did_url_parser::DID;
let did = DID::parse("did:example:alice")?;
// Prints Method = example
println!("Method = {}", did.method());
// Prints Method Id = alice
println!("Method Id = {}", did.method_id());
// Prints DID = did:example:alice
println!("DID = {}", did);
// Prints Joined = did:example:alice?query=true#key-1
println!("Joined = {}", did.join("#key-1")?.join("?query=true")?);