pub struct RoutePath(/* private fields */);Expand description
A validated route path using {parameter} placeholders.
Implementations§
Source§impl RoutePath
impl RoutePath
Sourcepub fn new(path: impl Into<String>) -> SoapResult<Self>
pub fn new(path: impl Into<String>) -> SoapResult<Self>
Validates and creates a route path.
Sourcepub fn join(&self, child: &Self) -> SoapResult<Self>
pub fn join(&self, child: &Self) -> SoapResult<Self>
Joins a group prefix and endpoint path using portable syntax.
Sourcepub fn shape(&self) -> String
pub fn shape(&self) -> String
Returns a canonical route shape with parameter names removed.
/users/{id} and /users/{user_id} intentionally share one shape so
catalogs can reject framework-dependent route conflicts.
Sourcepub fn parameter_names(&self) -> Vec<&str>
pub fn parameter_names(&self) -> Vec<&str>
Returns declared parameter names in route order.
Trait Implementations§
impl Eq for RoutePath
impl StructuralPartialEq for RoutePath
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