Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

A fixed-host, public-only client; no arbitrary URL, cookies, credentials or redirect is accepted.

Implementations§

Source§

impl Client

Source

pub fn retained_biography( &self, store: &Store, lang: &str, name: &str, ) -> Result<Value, String>

Revalidate public identity/revision on explicit reopen; fetch full text only when absent/changed. A failed revalidation leaves the retained copy intact, so the reader can report it while offline.

Source§

impl Client

Source

pub fn named_article(&self, lang: &str, name: &str) -> Result<Value, String>

Read one exact attributed title through fixed FR/EN hosts; never perform a name search.

Source

pub fn translated_article( &self, source: &str, id: u64, target: &str, ) -> Result<Value, String>

Explicitly follow one FR/EN interlanguage link and read its canonical main-namespace page. Both requests retain fixed public hosts, limits and provenance, without executing returned URLs.

Source§

impl Client

Source

pub fn search(&self, lang: &str, term: &str) -> Result<Value, String>

Explicit full-text search returns at most twenty main-namespace titles without remote HTML.

Source

pub fn article(&self, lang: &str, id: u64) -> Result<Value, String>

Read a bounded plain-text extract, retaining the revision reported by the same API response.

Trait Implementations§

Source§

impl Default for Client

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.