diff options
Diffstat (limited to '')
| -rw-r--r-- | jid/Cargo.toml | 2 | ||||
| -rw-r--r-- | jid/src/lib.rs | 1 | 
2 files changed, 3 insertions, 0 deletions
| diff --git a/jid/Cargo.toml b/jid/Cargo.toml index 439ef75..b8f4956 100644 --- a/jid/Cargo.toml +++ b/jid/Cargo.toml @@ -6,9 +6,11 @@ edition = "2021"  [features]  # default = []  rusqlite = ["dep:rusqlite"] +serde = ["dep:serde"]  # sqlx = ["dep:sqlx"]  [dependencies] +serde = { version = "1.0.219", features = ["derive"], optional = true }  rusqlite = { git = "https://github.com/Spxg/rusqlite.git", optional = true, branch = "wasm-demo" }  # sqlx = { version = "0.8.3", features = ["sqlite"], optional = true }  # sqlx = { path = "../../remote/sqlx", features = ["sqlite"], optional = true } diff --git a/jid/src/lib.rs b/jid/src/lib.rs index 9301f59..2499ca8 100644 --- a/jid/src/lib.rs +++ b/jid/src/lib.rs @@ -4,6 +4,7 @@ use std::{borrow::Cow, error::Error, fmt::Display, str::FromStr};  use sqlx::Sqlite;  #[derive(PartialEq, Debug, Clone, Eq, Hash)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]  pub struct JID {      // TODO: validate localpart (length, char]      pub localpart: Option<String>, | 
