[][src]Enum wikibase::SnakDataType

pub enum SnakDataType {
    Time,
    WikibaseItem,
    WikibaseProperty,
    String,
    ExternalId,
    GlobeCoordinate,
    MonolingualText,
    Quantity,
    Url,
    CommonsMedia,
    NotSet,
    NoValue,
    SomeValue,
}

The data type of a snak

A snak can have no value, some value or one of the following:

  • time
  • Wikibase item
  • string
  • external id
  • globe coordinate
  • monolingual text
  • quantity

Examples

This example is not tested
let no_value = SnakDataType::from_str("novalue");
let some_value = SnakDataType::from_str("somevalue");

Variants

TimeWikibaseItemWikibasePropertyStringExternalIdGlobeCoordinateMonolingualTextQuantityUrlCommonsMediaNotSetNoValueSomeValue

Trait Implementations

impl PartialEq<SnakDataType> for SnakDataType[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for SnakDataType[src]

impl Clone for SnakDataType[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for SnakDataType[src]

impl FromStr for SnakDataType[src]

type Err = WikibaseError

The associated error which can be returned from parsing.

impl Serialize for SnakDataType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<'a, T> TryFrom<&'a str> for T where
    T: FromStr

type Err = <T as FromStr>::Err

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err