did_url_parser

Crates.iodid_url_parser
lib.rsdid_url_parser
version0.2.0
sourcesrc
created_at2024-03-26 16:39:52.125377
updated_at2024-03-26 16:39:52.125377
descriptionA no_std parser for Decentralized Identifiers (DIDs)
homepage
repositoryhttps://github.com/iotaledger/did_url
max_upload_size
id1186705
size51,900
(iota-ci)

documentation

README

DID URL Parser

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")?);

References


License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 30

cargo fmt