pub enum RouteSegment {
Static(String),
Param,
Mixed(Vec<String>),
CatchAll,
}Expand description
One segment of a canonical route template.
Variants§
Static(String)
Literal path segment.
Param
Single-segment parameter such as {id}, :id, <int:id>, {id:int}, or [id].
Mixed(Vec<String>)
Literal pieces separated by single-segment parameters, such as {name}.json.
The first and last pieces may be empty; parameter names are discarded.
CatchAll
Parameter that consumes one or more remaining segments, such as {*rest}, {path...},
<path:rest>, [...slug], or *filepath.
Trait Implementations§
Source§impl Clone for RouteSegment
impl Clone for RouteSegment
Source§impl Debug for RouteSegment
impl Debug for RouteSegment
impl Eq for RouteSegment
Source§impl Hash for RouteSegment
impl Hash for RouteSegment
Source§impl Ord for RouteSegment
impl Ord for RouteSegment
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 RouteSegment
impl PartialEq for RouteSegment
Source§impl PartialOrd for RouteSegment
impl PartialOrd for RouteSegment
impl StructuralPartialEq for RouteSegment
Auto Trait Implementations§
impl Freeze for RouteSegment
impl RefUnwindSafe for RouteSegment
impl Send for RouteSegment
impl Sync for RouteSegment
impl Unpin for RouteSegment
impl UnsafeUnpin for RouteSegment
impl UnwindSafe for RouteSegment
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.