RouteMatch

Struct RouteMatch 

Source
pub struct RouteMatch<'router, 'path> { /* private fields */ }
Expand description

A routing match for a URL.

Implementations§

Source§

impl RouteMatch<'_, '_>

Source

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.

Source

pub fn component_id(&self) -> &str

The matched component.

Source

pub fn based_route(&self) -> &str

The matched route, as originally written in the manifest, combined with the base.

Source

pub fn based_route_or_prefix(&self) -> &str

The matched route, excluding any trailing wildcard, combined with the base.

Source

pub fn raw_route(&self) -> &str

The matched route, as originally written in the manifest.

Source

pub fn raw_route_or_prefix(&self) -> &str

The matched route, excluding any trailing wildcard.

Source

pub fn named_wildcards(&self) -> HashMap<&str, &str>

The named wildcards captured from the path, if any

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.