[][src]Struct wikibase::Snak

pub struct Snak { /* fields omitted */ }

Snak

Each Snak has a property and a value (data_value). Each claim has one main snak and an arbitrary amount of snaks for qualifiers and references.

Data type

  • commonsMedia
  • wikibase-item

Methods

impl Snak[src]

Main snak data structure

The main snak is an object that contains the main statement information: the property, datatype and the value. The statement, qualifiers and references are the 3 snaks of a statement object.

pub fn new<S: Into<String>>(
    datatype: S,
    property: S,
    snak_type: SnakType,
    data_value: Option<DataValue>
) -> Snak
[src]

pub fn datatype(&self) -> &str[src]

pub fn data_value(&self) -> &Option<DataValue>[src]

pub fn property(&self) -> &str[src]

pub fn set_datatype(&mut self, datatype: &str)[src]

pub fn set_data_value(&mut self, data_value: Option<DataValue>)[src]

pub fn set_property(&mut self, property: &str)[src]

pub fn set_snak_type(&mut self, snak_type: SnakType)[src]

pub fn snak_type(&self) -> &SnakType[src]

Trait Implementations

impl Debug for Snak[src]

Auto Trait Implementations

impl Send for Snak

impl Sync for Snak

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]