Skip to main content

things3_cloud/wire/
mod.rs

1//! Things Cloud sync protocol wire-format types.
2//!
3//! Observed item shape in history pages:
4//! `{ uuid: { "t": operation, "e": entity, "p": properties } }`.
5//! Replaying items in order by UUID yields current state.
6
7use serde::{Deserialize, Deserializer};
8
9pub mod area;
10pub mod checklist;
11pub mod notes;
12pub mod recurrence;
13pub mod tags;
14pub mod task;
15pub mod tombstone;
16pub mod wire_object;
17
18pub(crate) fn deserialize_optional_field<'de, D, T>(
19    deserializer: D,
20) -> Result<Option<Option<T>>, D::Error>
21where
22    D: Deserializer<'de>,
23    T: Deserialize<'de>,
24{
25    Option::<T>::deserialize(deserializer).map(Some)
26}