[][src]Struct wikipedia::Page

pub struct Page<'a, A: 'a + HttpClient> { /* fields omitted */ }

Methods

impl<'a, A: HttpClient> Page<'a, A>[src]

A wikipedia article.

pub fn from_title(wikipedia: &'a Wikipedia<A>, title: String) -> Page<A>[src]

Creates a new Page given a title.

pub fn from_pageid(wikipedia: &'a Wikipedia<A>, pageid: String) -> Page<A>[src]

Creates a new Page given a pageid.

pub fn get_pageid(&self) -> Result<String>[src]

Gets the Page's pageid.

pub fn get_title(&self) -> Result<String>[src]

Gets the Page's title.

pub fn get_content(&self) -> Result<String>[src]

Gets the markdown content of the article.

pub fn get_html_content(&self) -> Result<String>[src]

Gets the html content of the article.

pub fn get_summary(&self) -> Result<String>[src]

Gets a summary of the article.

pub fn get_images(&self) -> Result<Iter<A, Image>>[src]

Creates an iterator to view all images in the Page.

pub fn get_references(&self) -> Result<Iter<A, Reference>>[src]

Creates an iterator to view all references (external links) in the Page.

Creates an iterator to view all internal links in the Page.

pub fn get_categories(&self) -> Result<Iter<A, Category>>[src]

Creates an iterator to view all categories of the Page.

Creates an iterator to view all langlinks of the Page. This iterates over the page titles in all available languages.

pub fn get_coordinates(&self) -> Result<Option<(f64, f64)>>[src]

Returns the latitude and longitude associated to the Page if any.

pub fn get_sections(&self) -> Result<Vec<String>>[src]

Fetches all sections of the article.

pub fn get_section_content(&self, title: &str) -> Result<Option<String>>[src]

Fetches the content of a section.

Trait Implementations

impl<'a, A: HttpClient> PartialEq<Page<'a, A>> for Page<'a, A>[src]

impl<'a, A: Debug + 'a + HttpClient> Debug for Page<'a, A>[src]

Auto Trait Implementations

impl<'a, A> Send for Page<'a, A> where
    A: Sync

impl<'a, A> Unpin for Page<'a, A>

impl<'a, A> Sync for Page<'a, A> where
    A: Sync

impl<'a, A> UnwindSafe for Page<'a, A> where
    A: RefUnwindSafe

impl<'a, A> RefUnwindSafe for Page<'a, A> where
    A: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

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

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