mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-26 05:26:27 +00:00 
			
		
		
		
	Impl serialize on TopLevelMap
This commit is contained in:
		| @@ -2,13 +2,13 @@ use std::borrow::{Borrow, Cow}; | |||||||
| use std::collections::BTreeMap; | use std::collections::BTreeMap; | ||||||
| use std::fmt; | use std::fmt; | ||||||
|  |  | ||||||
| use serde::Deserialize; | use serde::{Deserialize, Serialize}; | ||||||
| use serde_json::value::RawValue; | use serde_json::value::RawValue; | ||||||
|  |  | ||||||
| #[derive(Deserialize)] | #[derive(Deserialize, Serialize)] | ||||||
| pub struct TopLevelMap<'p>(#[serde(borrow)] pub BTreeMap<CowStr<'p>, &'p RawValue>); | pub struct TopLevelMap<'p>(#[serde(borrow)] pub BTreeMap<CowStr<'p>, &'p RawValue>); | ||||||
|  |  | ||||||
| #[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)] | #[derive(Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)] | ||||||
| pub struct CowStr<'p>(#[serde(borrow)] pub Cow<'p, str>); | pub struct CowStr<'p>(#[serde(borrow)] pub Cow<'p, str>); | ||||||
|  |  | ||||||
| impl fmt::Display for CowStr<'_> { | impl fmt::Display for CowStr<'_> { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user