1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
use serde::{Deserialize, Serialize};

/// A language, as used in the Wikibase data model.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Lang(pub String);

/// Text that is in a certain language.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Text {
    /// The raw text.
    pub text: String,
    /// The language of the text.
    pub lang: Lang,
}