From d487791b0312d965ac822d5868d5274e88ba7368 Mon Sep 17 00:00:00 2001 From: mpostma Date: Tue, 22 Dec 2020 18:17:35 +0100 Subject: [PATCH] derive serde for method and format This is nicer when working with UpdateMeta struct --- src/update/index_documents/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/update/index_documents/mod.rs b/src/update/index_documents/mod.rs index 2c5d34092..7fab93343 100644 --- a/src/update/index_documents/mod.rs +++ b/src/update/index_documents/mod.rs @@ -181,7 +181,7 @@ pub fn write_into_lmdb_database( Ok(()) } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[non_exhaustive] pub enum IndexDocumentsMethod { /// Replace the previous document with the new one, @@ -193,7 +193,7 @@ pub enum IndexDocumentsMethod { UpdateDocuments, } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[non_exhaustive] pub enum UpdateFormat { /// The given update is a real **comma seperated** CSV with headers on the first line.