[][src]Struct wikibase::Configuration

pub struct Configuration { /* fields omitted */ }

Configurations for Wikibase RS

The Configuration struct holds all the parameters that can can be customized. The api_url is the api endpoint or a particular Wikibase instance. It defaults to Wikidata.

Methods

impl Configuration[src]

pub fn new(user_agent_prefix: &str) -> Result<Configuration, WikibaseError>[src]

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

pub fn set_api_url<S: Into<String>>(&mut self, api_url: S)[src]

pub fn user_agent(&self) -> String[src]

Returns the complete user agent that is used for requests

The full user agent is a combination of the user agent prefix, that is set by a library and the Wikibase RS user agent. For example: my_bot/0.2 Wikibase-RS/1.0.2.

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

Trait Implementations

impl Debug for Configuration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<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]