better match wikibase data model

This commit is contained in:
Smitty 2021-05-28 09:54:42 -04:00
parent 10fad9247e
commit d1d175628f
3 changed files with 20 additions and 8 deletions

11
src/text.rs Normal file
View file

@ -0,0 +1,11 @@
use serde::{Deserialize, Serialize};
/// A language used in the Wikibase data model.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Lang(pub String);
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Text {
pub text: String,
pub lang: Lang,
}