Struct yew_router::switch::Switch

source ·
pub struct Switch<R>where
    R: Routable + 'static,
{ /* private fields */ }
Expand description

A Switch that dispatches route among variants of a Routable.

When a route can’t be matched, including when the path is matched but the deserialization fails, it looks for the route with not_found attribute. If such a route is provided, it redirects to the specified route. Otherwise html! {} is rendered and a message is logged to console stating that no route can be matched. See the crate level document for more information.

Trait Implementations§

The Component’s Message.
The Component’s Properties.
Creates a component.
Updates component’s internal state.
React to changes of component properties.
Returns a component layout to be rendered.
Notified after a layout is rendered.
Notified before a component is destroyed.
Prepares the server-side state.
Formats the value using the given formatter. Read more
Properties for the Function Component.
Render the component. This function returns the Html to be rendered for the component. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Convert self to a value of a Properties struct.
Convert self to a value of a Properties struct.
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more