pub struct RedirectProps<'a> {
    pub to: &'a str,
    pub from: Option<&'a str>,
}
Expand description

The props for the Router component.

Fields

to: &'a str

The route to link to. This can be a relative path, or a full URL.

// Absolute path
Redirect { from: "", to: "/home" }

// Relative path
Redirect { from: "", to: "../" }
from: Option<&'a str>

The route to link from. This can be a relative path, or a full URL.

// Absolute path
Redirect { from: "", to: "/home" }

// Relative path
Redirect { from: "", to: "../" }

Implementations

Create a builder for building RedirectProps. On the builder, call .to(...), .from(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of RedirectProps.

Trait Implementations

The type of the builder for this component. Used to create “in-progress” versions of the props. Read more

An indication if these props are can be memoized automatically.

Create a builder for this component.

Memoization can only happen if the props are valid for the ’static lifetime 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 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.