pub struct Router { /* private fields */ }Expand description
Cross-platform reactive navigation router with history stack shared across Web, Mobile, Tablet, and Desktop.
Implementations§
Source§impl Router
Navigation history operations for Router.
impl Router
Navigation history operations for Router.
Sourcepub fn push(&mut self, path: String)
pub fn push(&mut self, path: String)
Pushes a new route path onto the history stack and updates the reactive signal.
§Arguments
&Self- Mutable router.String- Destination route path.
Sourcepub fn can_go_back(&self) -> bool
pub fn can_go_back(&self) -> bool
Source§impl Router
impl Router
pub fn get_current(&self) -> Signal<String>
pub fn get_mut_current(&mut self) -> &mut Signal<String>
pub fn set_current(&mut self, val: Signal<String>) -> &mut Self
pub fn get_cursor(&self) -> usize
pub fn get_mut_cursor(&mut self) -> &mut usize
pub fn set_cursor(&mut self, val: usize) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Forget for Router
impl Freeze for Router
impl Move for Router
impl RefUnwindSafe for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl UnsafeUnpin for Router
impl UnwindSafe for Router
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