Files
rustical/crates/store/src/addressbook.rs
2025-10-27 20:12:21 +01:00

22 lines
500 B
Rust

use crate::synctoken::format_synctoken;
use chrono::NaiveDateTime;
use serde::Serialize;
#[derive(Debug, Clone, Serialize)]
pub struct Addressbook {
pub id: String,
pub principal: String,
pub displayname: Option<String>,
pub description: Option<String>,
pub deleted_at: Option<NaiveDateTime>,
pub synctoken: i64,
pub push_topic: String,
}
impl Addressbook {
#[must_use]
pub fn format_synctoken(&self) -> String {
format_synctoken(self.synctoken)
}
}