pub struct RouteMatch<'router, 'path> { /* private fields */ }
Expand description
A routing match for a URL.
Implementations§
Source§impl RouteMatch<'_, '_>
impl RouteMatch<'_, '_>
Sourcepub fn synthetic(component_id: String, path: String) -> Self
pub fn synthetic(component_id: String, path: String) -> Self
A synthetic match as if the given path was matched against the wildcard route. Used in service chaining.
Sourcepub fn component_id(&self) -> &str
pub fn component_id(&self) -> &str
The matched component.
Sourcepub fn based_route(&self) -> &str
pub fn based_route(&self) -> &str
The matched route, as originally written in the manifest, combined with the base.
Sourcepub fn based_route_or_prefix(&self) -> &str
pub fn based_route_or_prefix(&self) -> &str
The matched route, excluding any trailing wildcard, combined with the base.
Sourcepub fn raw_route_or_prefix(&self) -> &str
pub fn raw_route_or_prefix(&self) -> &str
The matched route, excluding any trailing wildcard.
Sourcepub fn named_wildcards(&self) -> HashMap<&str, &str>
pub fn named_wildcards(&self) -> HashMap<&str, &str>
The named wildcards captured from the path, if any
Sourcepub fn trailing_wildcard(&self) -> Cow<'_, str>
pub fn trailing_wildcard(&self) -> Cow<'_, str>
The trailing wildcard part of the path, if any
Auto Trait Implementations§
impl<'router, 'path> Freeze for RouteMatch<'router, 'path>
impl<'router, 'path> RefUnwindSafe for RouteMatch<'router, 'path>
impl<'router, 'path> Send for RouteMatch<'router, 'path>
impl<'router, 'path> Sync for RouteMatch<'router, 'path>
impl<'router, 'path> Unpin for RouteMatch<'router, 'path>
impl<'router, 'path> UnwindSafe for RouteMatch<'router, 'path>
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