pub struct RedirectProps<'a> {
pub to: &'a str,
pub from: Option<&'a str>,
}Expand description
The props for the Router component.
Fields§
§to: &'a strThe 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§
Trait Implementations§
Source§impl<'a> Properties for RedirectProps<'a>
impl<'a> Properties for RedirectProps<'a>
Auto Trait Implementations§
impl<'a> Freeze for RedirectProps<'a>
impl<'a> RefUnwindSafe for RedirectProps<'a>
impl<'a> Send for RedirectProps<'a>
impl<'a> Sync for RedirectProps<'a>
impl<'a> Unpin for RedirectProps<'a>
impl<'a> UnwindSafe for RedirectProps<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more