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: String

The ID of a file on Wikimedia Commons.

GlobeCoordinate

Fields

lat: f64

Latitude.

lon: f64

Longitude.

precision: f64

How many degrees of distance of precision there are.

globe: Qid

The globe the coordnaties are on, usually Earth.

Coordinates on some globe.

Item(Qid)

Tuple Fields

0: Qid

A Wikidata item.

Property(Pid)

Tuple Fields

0: Pid

A Wikidata property.

String(String)

Tuple Fields

0: String

A language-less string of text.

MonolingualText(Text)

Tuple Fields

0: Text

Text with a language.

MultilingualText(Vec<Text>)

Tuple Fields

0: Vec<Text>

The same text, translated across multiple languages.

ExternalID(String)

Tuple Fields

0: String

An external identifier.

Quantity

Fields

amount: f64

How much.

lower_bound: Option<f64>

The lowest possible value. If this isn’t present then it is exactly the amount.

upper_bound: Option<f64>

The highest possible value. If this isn’t present then it is exactly the amount.

unit: Option<Qid>

The units used.

Some numeric quantity of something.

DateTime

Fields

date_time: DateTime<Utc>

The time as a Chrono DateTime.

precision: u8

The precision of the date:

precisiontime
01 billion years
1100 million years
210 million years
31 million years
4100k years
510k years
61000 years
7100 years
8decade
9year
10month
11day
12hour (deprecated)
13minute (deprecated)
14second (deprecated)

A point in time time.

Url(String)

Tuple Fields

0: String

A URL.

MathExpr(String)

Tuple Fields

0: String

A LaTeX math expression.

GeoShape(String)

Tuple Fields

0: String

A geometric shape. The value of the string is currently unspecified.

MusicNotation(String)

Tuple Fields

0: String

LilyPond musical notation.

TabularData(String)

Tuple Fields

0: String

ID of a file with tabular data on Wikimedia commons.

Lexeme(Lid)

Tuple Fields

0: Lid

A lexeme ID on Wikidata.

Form(Fid)

Tuple Fields

0: Fid

A form ID on Wikidata.

Sense(Sid)

Tuple Fields

0: Sid

A 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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 !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.