pub fn match_segs(&mut self, segs: &[&str]) -> bool {
        // The incoming segments should be fewer than the segments the current
        // request can provide.
        if self.path_segs.len() < segs.len() {
            return false
        }
        if self.path_segs.iter()
            .zip(segs.iter())
            .all(|(req_seg, api_seg)| req_seg == api_seg) {
            self.path_segs.drain(..segs.len());
            true
        } else {
            false
        }
    }
/// Match several segments of path. It matches when and only when all the
/// segments are matching. See `match_segs()`.
Match several segments of path. It matches when and only when all the
segments are matching.
Match several segments of path . It matches when and only when all the segments are matching .
pub fn match_segs(&mut self, segs: &[&str]) -> bool {
        // The incoming segments should be fewer than the segments the current
        // request can provide.
        if self.path_segs.len() < segs.len() {
            return false
        }
        if self.path_segs.iter()
            .zip(segs.iter())
            .all(|(req_seg, api_seg)| req_seg == api_seg) {
            self.path_segs.drain(..segs.len());
            true
        } else {
            false
        }
    }
pub fn match_segs ( & mut self , segs : & [ & str ] ) -> bool { // The incoming segments should be fewer than the segments the current // request can provide. if self . path_segs . len ( ) < segs . len ( ) { return false } if self . path_segs . iter ( ) . zip ( segs . iter ( ) ) . all ( | ( req_seg , api_seg ) | req_seg == api_seg ) { self . path_segs . drain ( .. segs . len ( ) ) ; true } else { false } }
Match several segments of path.
Match several segments of path .
&mut self
segs
&[&str]
&mut self
segs
&[&str]