pub struct RoutePath { /* private fields */ }Expand description
A typed absolute route: segments built from Route values plus query params.
route(&Section::Stack).then(&Drill::Item { id: 42 }).param("hint", "linked") encodes to
"stack/item-42?hint=linked" — RoutePath::navigate it, or hand it to nav_link_to.
Implementations§
Source§impl RoutePath
impl RoutePath
Sourcepub fn param(self, name: &str, value: impl Display) -> RoutePath
pub fn param(self, name: &str, value: impl Display) -> RoutePath
Append a query param (the destination reads it via route_param).
Sourcepub fn to_route(&self) -> String
pub fn to_route(&self) -> String
The encoded route string (percent-escaped where needed) — what navigate accepts.
Navigate to this path. False = no surface recognized the first segment.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoutePath
impl RefUnwindSafe for RoutePath
impl Send for RoutePath
impl Sync for RoutePath
impl Unpin for RoutePath
impl UnsafeUnpin for RoutePath
impl UnwindSafe for RoutePath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more