[−][src]Struct wikibase::ItemEntity
Wikibase entity (item)
Items and properties are very similar in Wikibase. They have a prefix followed by an ID, labels, descriptions, aliases. Both items and properties have statements that may have qualifiers. Statements can also contain references, in which case they are called statements, but are handled the same way in the API.
Items can also have sitelinks to various projects. On Wikidata for example an item can link to Wikpedia, Wikisource, Wiktionary in various languages. The actual wiki-pages attached to an item or property can't be accessed at the moment. This includes the edit-history, the talk page and the pages various settings (protection, locked, ...).
Entities can be created manually or from a JSON that needs to have the same structure as the Wikibase API.
Example
let item = wikibase::Entity::new_item("Q2807".to_string(), vec![], vec![], vec![], vec![], None, false);
Methods
impl ItemEntity
[src]
pub fn set_sitelink(&mut self, new_sitelink: SiteLink)
[src]
Trait Implementations
impl Clone for ItemEntity
[src]
fn clone(&self) -> ItemEntity
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ItemEntity
[src]
Auto Trait Implementations
impl Send for ItemEntity
impl Sync for ItemEntity
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,