pub struct Router<P> { /* private fields */ }Expand description
Router for managing page navigation with history
Implementations§
Source§impl<P: Clone + PartialEq> Router<P>
impl<P: Clone + PartialEq> Router<P>
Sourcepub fn with_max_history(self, max: usize) -> Self
pub fn with_max_history(self, max: usize) -> Self
Set maximum history size
Navigate to a new page
Sourcepub fn can_forward(&self) -> bool
pub fn can_forward(&self) -> bool
Check if can go forward
Sourcepub fn history_len(&self) -> usize
pub fn history_len(&self) -> usize
Get history length
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear all history
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for Router<P>where
P: Freeze,
impl<P> RefUnwindSafe for Router<P>where
P: RefUnwindSafe,
impl<P> Send for Router<P>where
P: Send,
impl<P> Sync for Router<P>where
P: Sync,
impl<P> Unpin for Router<P>where
P: Unpin,
impl<P> UnsafeUnpin for Router<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Router<P>where
P: UnwindSafe,
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