pub enum RouterLoadState {
Loaded {
template_name: String,
path: String,
},
Loading {
template_name: String,
path: String,
},
Server,
}
Expand description
The current load state of the router. You can use this to be warned of when a new page is about to be loaded (and display a loading bar or the like, perhaps).
Variants
Loaded
Fields
template_name: String
The name of the template being loaded (mostly for convenience).
path: String
The full path to the new page being loaded (including the locale, if we’re using i18n).
The page has been loaded.
Loading
Fields
template_name: String
The name of the template being loaded (mostly for convenience).
path: String
The full path to the new page being loaded (including the locale, if we’re using i18n).
A new page is being loaded, and will soon replace whatever is currently loaded. The name of the new template is attached.
Server
We’re on the server, and there is no router. Whatever you render based on this state will appear when the user first loads the page, before it’s made interactive.
Trait Implementations
sourceimpl Clone for RouterLoadState
impl Clone for RouterLoadState
sourcefn clone(&self) -> RouterLoadState
fn clone(&self) -> RouterLoadState
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
Auto Trait Implementations
impl RefUnwindSafe for RouterLoadState
impl Send for RouterLoadState
impl Sync for RouterLoadState
impl Unpin for RouterLoadState
impl UnwindSafe for RouterLoadState
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