Enum wikidata::ClaimValueData [−][src]
pub enum ClaimValueData {
Show 20 variants
CommonsMedia(String),
GlobeCoordinate {
lat: f64,
lon: f64,
precision: f64,
globe: Qid,
},
Item(Qid),
Property(Pid),
String(String),
MonolingualText(Text),
MultilingualText(Vec<Text>),
ExternalID(String),
Quantity {
amount: f64,
lower_bound: Option<f64>,
upper_bound: Option<f64>,
unit: Option<Qid>,
},
DateTime {
date_time: DateTime<Utc>,
precision: u8,
},
Url(String),
MathExpr(String),
GeoShape(String),
MusicNotation(String),
TabularData(String),
Lexeme(Lid),
Form(Fid),
Sense(Sid),
NoValue,
UnknownValue,
}Expand description
Data relating to a claim value.
Variants
CommonsMedia(String)
Tuple Fields
0: StringThe ID of a file on Wikimedia Commons.
GlobeCoordinate
Fields
lat: f64Latitude.
lon: f64Longitude.
precision: f64How many degrees of distance of precision there are.
Coordinates on some globe.
Item(Qid)
Tuple Fields
0: QidA Wikidata item.
Property(Pid)
Tuple Fields
0: PidA Wikidata property.
String(String)
Tuple Fields
0: StringA language-less string of text.
MonolingualText(Text)
Tuple Fields
0: TextText with a language.
MultilingualText(Vec<Text>)
The same text, translated across multiple languages.
ExternalID(String)
Tuple Fields
0: StringAn external identifier.
Quantity
Fields
amount: f64How much.
lower_bound: Option<f64>The lowest possible value. If this isn’t present then it is exactly the amount.
Some numeric quantity of something.
DateTime
Fields
precision: u8The precision of the date:
| precision | time |
|---|---|
0 | 1 billion years |
1 | 100 million years |
2 | 10 million years |
3 | 1 million years |
4 | 100k years |
5 | 10k years |
6 | 1000 years |
7 | 100 years |
8 | decade |
9 | year |
10 | month |
11 | day |
12 | hour (deprecated) |
13 | minute (deprecated) |
14 | second (deprecated) |
A point in time time.
Url(String)
Tuple Fields
0: StringA URL.
MathExpr(String)
Tuple Fields
0: StringA LaTeX math expression.
GeoShape(String)
Tuple Fields
0: StringA geometric shape. The value of the string is currently unspecified.
MusicNotation(String)
Tuple Fields
0: StringLilyPond musical notation.
TabularData(String)
Tuple Fields
0: StringID of a file with tabular data on Wikimedia commons.
Lexeme(Lid)
Tuple Fields
0: LidA lexeme ID on Wikidata.
Form(Fid)
Tuple Fields
0: FidA form ID on Wikidata.
Sense(Sid)
Tuple Fields
0: SidA sense ID on Wikidata.
NoValue
No value.
UnknownValue
Unknown value.
Implementations
Parses a snak.
Errors
If the snak does not correspond to a valid snak, then an error will be returned.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ClaimValueData
impl Send for ClaimValueData
impl Sync for ClaimValueData
impl Unpin for ClaimValueData
impl UnwindSafe for ClaimValueData
Blanket Implementations
Mutably borrows from an owned value. Read more
