pub struct RouteShape { /* private fields */ }Expand description
Framework-independent route template. Parameter names are not part of the shape.
Implementations§
Source§impl RouteShape
impl RouteShape
Sourcepub fn parse(path: &str) -> Self
pub fn parse(path: &str) -> Self
Parses a normalized path or route template. Query strings and fragments are ignored.
Sourcepub fn segments(&self) -> &[RouteSegment]
pub fn segments(&self) -> &[RouteSegment]
Returns the canonical segments in path order.
Sourcepub fn is_concrete(&self) -> bool
pub fn is_concrete(&self) -> bool
Returns true when the shape has no parameter segment.
Trait Implementations§
Source§impl Clone for RouteShape
impl Clone for RouteShape
Source§impl Debug for RouteShape
impl Debug for RouteShape
impl Eq for RouteShape
Source§impl Hash for RouteShape
impl Hash for RouteShape
Source§impl Ord for RouteShape
impl Ord for RouteShape
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RouteShape
impl PartialEq for RouteShape
Source§impl PartialOrd for RouteShape
impl PartialOrd for RouteShape
impl StructuralPartialEq for RouteShape
Auto Trait Implementations§
impl Freeze for RouteShape
impl RefUnwindSafe for RouteShape
impl Send for RouteShape
impl Sync for RouteShape
impl Unpin for RouteShape
impl UnsafeUnpin for RouteShape
impl UnwindSafe for RouteShape
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.