Struct routefinder::RouteSpec
source · pub struct RouteSpec { /* private fields */ }
Expand description
Routefinder’s representation of the parsed route
This contains both an optional source string (or unique description) and
an ordered sequence of Segment
s
Implementations§
source§impl RouteSpec
impl RouteSpec
sourcepub fn source(&self) -> Option<&str>
pub fn source(&self) -> Option<&str>
Retrieve a reference to the original route definition, if this routespec was parsed from a string representation. If this routespec was created another way, this will return None.
sourcepub fn segments(&self) -> &[Segment]
pub fn segments(&self) -> &[Segment]
Slice accessor for the component Segment
s in this RouteSpec
Trait Implementations§
source§impl Ord for RouteSpec
impl Ord for RouteSpec
source§impl PartialEq for RouteSpec
impl PartialEq for RouteSpec
source§impl PartialOrd for RouteSpec
impl PartialOrd for RouteSpec
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for RouteSpec
impl StructuralPartialEq for RouteSpec
Auto Trait Implementations§
impl Freeze for RouteSpec
impl RefUnwindSafe for RouteSpec
impl Send for RouteSpec
impl Sync for RouteSpec
impl Unpin for RouteSpec
impl UnwindSafe for RouteSpec
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