better match wikibase data model
This commit is contained in:
parent
10fad9247e
commit
d1d175628f
3 changed files with 20 additions and 8 deletions
11
src/text.rs
Normal file
11
src/text.rs
Normal 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,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue