pub struct PagerState { /* private fields */ }Expand description
State for a horizontal pager with page snapping.
Implementations§
Source§impl PagerState
impl PagerState
pub fn new(page_count: usize) -> Self
pub fn current_page(&self) -> usize
pub fn page_count(&self) -> usize
Sourcepub fn set_page_count(&self, count: usize)
pub fn set_page_count(&self, count: usize)
Update the page count (e.g. list shrank/grew). Clamps current_page
so it can never go out of bounds against a stale count.
Auto Trait Implementations§
impl !RefUnwindSafe for PagerState
impl !Send for PagerState
impl !Sync for PagerState
impl !UnwindSafe for PagerState
impl Freeze for PagerState
impl Unpin for PagerState
impl UnsafeUnpin for PagerState
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