summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-11-10 16:33:06 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-11-10 16:33:06 -0800
commit582fcf863328840a09ff9ede919043ae266a2f87 (patch)
tree306bac86f442549aa77aeb560899312371e84f96
parentcd67cbbb2827c161aa6e99c93fe57f5500cbb789 (diff)
downloadadenosine-582fcf863328840a09ff9ede919043ae266a2f87.tar.gz
adenosine-582fcf863328840a09ff9ede919043ae266a2f87.zip
cli: serializable DID
-rw-r--r--adenosine-cli/Cargo.toml3
-rw-r--r--adenosine-cli/src/identifiers.rs4
2 files changed, 4 insertions, 3 deletions
diff --git a/adenosine-cli/Cargo.toml b/adenosine-cli/Cargo.toml
index 55ac268..3128b49 100644
--- a/adenosine-cli/Cargo.toml
+++ b/adenosine-cli/Cargo.toml
@@ -18,7 +18,8 @@ repository = "https://gitlab.com/bnewbold/adenosine"
structopt = "*"
# NOTE: could try 'rustls-tls' feature instead of default native TLS?
reqwest = { version = "0.11", features = ["blocking", "json"] }
-serde_json = "*"
+serde = "1"
+serde_json = "1"
base64 = "*"
regex = "*"
lazy_static = "*"
diff --git a/adenosine-cli/src/identifiers.rs b/adenosine-cli/src/identifiers.rs
index ed9c0fd..a6a2696 100644
--- a/adenosine-cli/src/identifiers.rs
+++ b/adenosine-cli/src/identifiers.rs
@@ -152,7 +152,7 @@ fn test_aturi() {
}
/// A String (newtype) representing an NSID
-#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, serde::Serialize)]
pub struct Nsid(String);
impl FromStr for Nsid {
@@ -205,7 +205,7 @@ fn test_nsid() {
assert_eq!(nsid.domain(), "atproto.com".to_string());
}
-#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, serde::Serialize)]
pub struct Did(String);
impl FromStr for Did {