mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
22 lines
500 B
Rust
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)
|
|
}
|
|
}
|