[][src]Struct yew_router::router::Props

pub struct Props<STATE: RouterState, SW: Switch + Clone + 'static> {
    pub render: Render<SW, STATE>,
    pub redirect: Option<Redirect<SW, STATE>>,
}

Properties for Router.

Fields

render: Render<SW, STATE>

Render function that takes a Switch and produces Html

redirect: Option<Redirect<SW, STATE>>

Optional redirect function that will convert the route to a known switch variant if explicit matching fails. This should mostly be used to handle 404s and redirection. It is not strictly necessary as your Switch is capable of handling unknown routes using #[to="/{*:any}"].

Trait Implementations

impl<STATE: Clone + RouterState, SW: Clone + Switch + 'static> Clone for Props<STATE, SW>[src]

impl<STATE: RouterState, SW: Switch + Clone> Debug for Props<STATE, SW>[src]

impl<STATE: RouterState, SW: Switch + Clone + 'static> Properties for Props<STATE, SW>[src]

type Builder = PropsBuilder<STATE, SW, PropsBuilderStep_missing_required_prop_render>

Builder that will be used to construct properties

Auto Trait Implementations

impl<STATE, SW> !RefUnwindSafe for Props<STATE, SW>

impl<STATE, SW> !Send for Props<STATE, SW>

impl<STATE, SW> !Sync for Props<STATE, SW>

impl<STATE, SW> Unpin for Props<STATE, SW>

impl<STATE, SW> !UnwindSafe for Props<STATE, SW>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.