We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fee4076 commit 0c921b9Copy full SHA for 0c921b9
did_parser/README.md
@@ -0,0 +1,3 @@
1
+# did_parser
2
+
3
+A crate for parsing DIDs and DID URLs.
did_parser/examples/did_parser/main.rs
@@ -0,0 +1,10 @@
+use did_parser::{Did, DidUrl};
+fn main() {
4
+ // parse a string into DID
5
+ Did::parse("did:web:w3c-ccg.github.io".into()).expect("should correctly parse did");
6
7
+ // parse a string into DID URL
8
+ DidUrl::parse("did:example:123456789abcdefghi;param=value?query=value".into())
9
+ .expect("should correctly parse did url");
10
+}
0 commit comments