diff options
author | 2025-04-28 19:53:11 +0100 | |
---|---|---|
committer | 2025-04-28 19:53:11 +0100 | |
commit | 42c7423667a2d6acdebca75250ad30c5d475081b (patch) | |
tree | 65faaac42cf3f8ef83715ee7f66db1af45dd39d6 /jid/src/lib.rs | |
parent | 66cd4d48142124d920e5cc57f685555d279b8c7a (diff) | |
download | luz-42c7423667a2d6acdebca75250ad30c5d475081b.tar.gz luz-42c7423667a2d6acdebca75250ad30c5d475081b.tar.bz2 luz-42c7423667a2d6acdebca75250ad30c5d475081b.zip |
feat: serde
Diffstat (limited to '')
-rw-r--r-- | jid/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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>, |