[−][src]Struct wikibase::Configuration
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
Auto Trait Implementations
impl Send for Configuration
impl Sync for Configuration
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,