pub struct RouterState { /* private fields */ }
Expand description
The state for the router.
Implementations
sourceimpl RouterState
impl RouterState
sourcepub fn get_load_state(&self) -> ReadSignal<RouterLoadState>
pub fn get_load_state(&self) -> ReadSignal<RouterLoadState>
Gets the load state of the router. You’ll still need to call .get()
after this (this just returns a ReadSignal
to derive other state from in a create_memo
or the like).
sourcepub fn set_load_state(&self, new: RouterLoadState)
pub fn set_load_state(&self, new: RouterLoadState)
Sets the load state of the router.
sourcepub fn get_last_verdict(&self) -> Option<RouteVerdict<TemplateNodeType>>
pub fn get_last_verdict(&self) -> Option<RouteVerdict<TemplateNodeType>>
Gets the last verdict.
sourcepub fn set_last_verdict(&mut self, new: RouteVerdict<TemplateNodeType>)
pub fn set_last_verdict(&mut self, new: RouteVerdict<TemplateNodeType>)
Sets the last verdict.
sourcepub fn reload(&self)
pub fn reload(&self)
Orders the router to reload the current page as if you’d called navigate()
to it (but that would do nothing). This
enables reloading in an SPA style (but you should almost never need it).
Warning: if you’re trying to rest your app, do NOT use this! Instead, reload the page fully through web_sys
.
Trait Implementations
sourceimpl Clone for RouterState
impl Clone for RouterState
sourcefn clone(&self) -> RouterState
fn clone(&self) -> RouterState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RouterState
impl Debug for RouterState
sourceimpl Default for RouterState
impl Default for RouterState
Auto Trait Implementations
impl !RefUnwindSafe for RouterState
impl !Send for RouterState
impl !Sync for RouterState
impl Unpin for RouterState
impl !UnwindSafe for RouterState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more