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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.