Improve entity documentation
This commit is contained in:
parent
249cd707ee
commit
6f54023b96
1 changed files with 7 additions and 6 deletions
|
@ -19,18 +19,18 @@ pub struct Entity {
|
||||||
pub descriptions: BTreeMap<Lang, String>,
|
pub descriptions: BTreeMap<Lang, String>,
|
||||||
/// All of the labels in all known languages.
|
/// All of the labels in all known languages.
|
||||||
pub labels: BTreeMap<Lang, String>,
|
pub labels: BTreeMap<Lang, String>,
|
||||||
/// Known aliases of the item
|
/// Known aliases of the item.
|
||||||
pub aliases: BTreeMap<Lang, Vec<String>>,
|
pub aliases: BTreeMap<Lang, Vec<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Three main types of IDs entities can have.
|
/// Three main types of IDs entities can have.
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum WikiId {
|
pub enum WikiId {
|
||||||
/// A Qid
|
/// A Qid, representing an entity.
|
||||||
EntityId(Qid),
|
EntityId(Qid),
|
||||||
/// A Pid
|
/// A Pid, representing a property.
|
||||||
PropertyId(Pid),
|
PropertyId(Pid),
|
||||||
/// An Lid
|
/// An Lid, representing a lexeme.
|
||||||
LexemeId(Lid),
|
LexemeId(Lid),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ pub enum ClaimValueData {
|
||||||
lon: f64,
|
lon: f64,
|
||||||
/// How many degrees of distance of precision there are.
|
/// How many degrees of distance of precision there are.
|
||||||
precision: f64,
|
precision: f64,
|
||||||
/// The globe the coordnaties are on, usually usually Q2 for Earth.
|
/// The globe the coordnaties are on, usually usually [Earth](consts::EARTH).
|
||||||
globe: Qid,
|
globe: Qid,
|
||||||
},
|
},
|
||||||
/// A Wikidata item.
|
/// A Wikidata item.
|
||||||
|
@ -141,7 +141,8 @@ impl Default for ClaimValueData {
|
||||||
/// A statement rank.
|
/// A statement rank.
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)]
|
||||||
pub enum Rank {
|
pub enum Rank {
|
||||||
/// The deprecated rank, indicating outdated/wrong info.
|
/// The deprecated rank, indicating outdated/wrong info. Deprecated claims should usually be
|
||||||
|
/// ignored.
|
||||||
Deprecated,
|
Deprecated,
|
||||||
/// Normal rank, the default.
|
/// Normal rank, the default.
|
||||||
Normal,
|
Normal,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue