pub struct Paginator<'a> { /* private fields */ }Expand description
A simple paginator widget for page indicators.
Implementations§
Source§impl<'a> Paginator<'a>
impl<'a> Paginator<'a>
Sourcepub fn with_pages(current_page: u64, total_pages: u64) -> Self
pub fn with_pages(current_page: u64, total_pages: u64) -> Self
Create a paginator with the provided page counts.
Sourcepub fn current_page(self, current_page: u64) -> Self
pub fn current_page(self, current_page: u64) -> Self
Set the current page (1-based).
Sourcepub fn total_pages(self, total_pages: u64) -> Self
pub fn total_pages(self, total_pages: u64) -> Self
Set the total pages.
Sourcepub fn mode(self, mode: PaginatorMode) -> Self
pub fn mode(self, mode: PaginatorMode) -> Self
Set the display mode.
Sourcepub fn dots_symbols(self, active: &'a str, inactive: &'a str) -> Self
pub fn dots_symbols(self, active: &'a str, inactive: &'a str) -> Self
Set the symbols used for dot mode.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Paginator<'a>
impl<'a> RefUnwindSafe for Paginator<'a>
impl<'a> Send for Paginator<'a>
impl<'a> Sync for Paginator<'a>
impl<'a> Unpin for Paginator<'a>
impl<'a> UnwindSafe for Paginator<'a>
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