pub struct Pagination {
pub current_page: Option<u32>,
pub total_pages: Option<u32>,
pub prev_url: Option<String>,
pub next_url: Option<String>,
pub first_url: Option<String>,
pub last_url: Option<String>,
pub page_urls: Vec<PageUrl>,
pub pagination_type: PaginationType,
pub has_infinite_scroll: bool,
pub has_load_more: bool,
pub items_per_page: Option<u32>,
pub total_items: Option<u32>,
}Expand description
Pagination information for a page
Fields§
§current_page: Option<u32>Current page number (if detected)
total_pages: Option<u32>Total pages (if detected)
prev_url: Option<String>Previous page URL (rel=“prev”)
next_url: Option<String>Next page URL (rel=“next”)
first_url: Option<String>First page URL
last_url: Option<String>Last page URL
page_urls: Vec<PageUrl>All detected page URLs with their numbers
pagination_type: PaginationTypePagination type detected
has_infinite_scroll: boolWhether infinite scroll is detected
has_load_more: boolWhether “load more” button is detected
items_per_page: Option<u32>Items per page (if detected)
total_items: Option<u32>Total items (if detected)
Implementations§
Source§impl Pagination
impl Pagination
pub fn new() -> Self
Sourcepub fn has_pagination(&self) -> bool
pub fn has_pagination(&self) -> bool
Check if pagination exists
Sourcepub fn is_first_page(&self) -> bool
pub fn is_first_page(&self) -> bool
Check if this is the first page
Sourcepub fn is_last_page(&self) -> bool
pub fn is_last_page(&self) -> bool
Check if this is the last page
Sourcepub fn all_page_urls(&self) -> Vec<String>
pub fn all_page_urls(&self) -> Vec<String>
Get all URLs to crawl for complete pagination
Trait Implementations§
Source§impl Clone for Pagination
impl Clone for Pagination
Source§fn clone(&self) -> Pagination
fn clone(&self) -> Pagination
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Pagination
impl Debug for Pagination
Source§impl Default for Pagination
impl Default for Pagination
Source§fn default() -> Pagination
fn default() -> Pagination
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Pagination
impl<'de> Deserialize<'de> for Pagination
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Pagination
impl PartialEq for Pagination
Source§impl Serialize for Pagination
impl Serialize for Pagination
impl StructuralPartialEq for Pagination
Auto Trait Implementations§
impl Freeze for Pagination
impl RefUnwindSafe for Pagination
impl Send for Pagination
impl Sync for Pagination
impl Unpin for Pagination
impl UnwindSafe for Pagination
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