pub struct Page<'a, A: 'a + HttpClient> { /* private fields */ }Implementations§
Source§impl<'a, A: HttpClient> Page<'a, A>
A wikipedia article.
impl<'a, A: HttpClient> Page<'a, A>
A wikipedia article.
Sourcepub fn from_title(wikipedia: &'a Wikipedia<A>, title: String) -> Page<'_, A>
pub fn from_title(wikipedia: &'a Wikipedia<A>, title: String) -> Page<'_, A>
Creates a new Page given a title.
Sourcepub fn from_pageid(wikipedia: &'a Wikipedia<A>, pageid: String) -> Page<'_, A>
pub fn from_pageid(wikipedia: &'a Wikipedia<A>, pageid: String) -> Page<'_, A>
Creates a new Page given a pageid.
Sourcepub fn get_pageid<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
pub fn get_pageid<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
Gets the Page’s pageid.
Sourcepub fn get_content<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
pub fn get_content<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
Gets the markdown content of the article.
Sourcepub fn get_html_content<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
pub fn get_html_content<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
Gets the html content of the article.
Sourcepub fn get_summary<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
pub fn get_summary<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_recursion>>where
'life_self: 'async_recursion,
Gets a summary of the article.
Sourcepub async fn get_images(&self) -> Result<Iter<'_, A, Image>>
pub async fn get_images(&self) -> Result<Iter<'_, A, Image>>
Creates an iterator to view all images in the Page.
Sourcepub async fn get_references(&self) -> Result<Iter<'_, A, Reference>>
pub async fn get_references(&self) -> Result<Iter<'_, A, Reference>>
Creates an iterator to view all references (external links) in the Page.
Sourcepub async fn get_links(&self) -> Result<Iter<'_, A, Link>>
pub async fn get_links(&self) -> Result<Iter<'_, A, Link>>
Creates an iterator to view all internal links in the Page.
Sourcepub async fn get_categories(&self) -> Result<Iter<'_, A, Category>>
pub async fn get_categories(&self) -> Result<Iter<'_, A, Category>>
Creates an iterator to view all categories of the Page.
Sourcepub async fn get_langlinks(&self) -> Result<Iter<'_, A, LangLink>>
pub async fn get_langlinks(&self) -> Result<Iter<'_, A, LangLink>>
Creates an iterator to view all langlinks of the Page.
This iterates over the page titles in all available languages.
Sourcepub fn get_coordinates<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<Option<(f64, f64)>>> + 'async_recursion>>where
'life_self: 'async_recursion,
pub fn get_coordinates<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<Option<(f64, f64)>>> + 'async_recursion>>where
'life_self: 'async_recursion,
Returns the latitude and longitude associated to the Page if any.
Sourcepub async fn get_sections(&self) -> Result<Vec<String>>
pub async fn get_sections(&self) -> Result<Vec<String>>
Fetches all sections of the article.
Trait Implementations§
Source§impl<'a, A: HttpClient> PartialEq for Page<'a, A>
impl<'a, A: HttpClient> PartialEq for Page<'a, A>
Auto Trait Implementations§
impl<'a, A> Freeze for Page<'a, A>
impl<'a, A> RefUnwindSafe for Page<'a, A>where
A: RefUnwindSafe,
impl<'a, A> Send for Page<'a, A>where
A: Sync,
impl<'a, A> Sync for Page<'a, A>where
A: Sync,
impl<'a, A> Unpin for Page<'a, A>
impl<'a, A> UnwindSafe for Page<'a, A>where
A: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more