From 9391181c268c982470774d032d426c778f3a4142 Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:54:28 +0800 Subject: [PATCH] chore: serde row details --- collab-database/src/rows/row.rs | 2 +- collab-database/src/rows/row_meta.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/collab-database/src/rows/row.rs b/collab-database/src/rows/row.rs index 86f46e922..60e098fcc 100644 --- a/collab-database/src/rows/row.rs +++ b/collab-database/src/rows/row.rs @@ -215,7 +215,7 @@ impl DatabaseRow { } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct RowDetail { pub row: Row, pub meta: RowMeta, diff --git a/collab-database/src/rows/row_meta.rs b/collab-database/src/rows/row_meta.rs index 8b276fd27..da8d5a15c 100644 --- a/collab-database/src/rows/row_meta.rs +++ b/collab-database/src/rows/row_meta.rs @@ -1,4 +1,5 @@ use collab::preclude::{MapRef, MapRefExtension, ReadTxn, TransactionMut}; +use serde::{Deserialize, Serialize}; use uuid::Uuid; use crate::rows::{meta_id_from_row_id, RowMetaKey}; @@ -70,7 +71,7 @@ impl<'a, 'b, 'c> RowMetaUpdate<'a, 'b, 'c> { } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct RowMeta { pub icon_url: Option, pub cover_url: Option,