Struct gotham::router::tree::SegmentMapping
[−]
[src]
pub struct SegmentMapping<'a, 'b> { /* fields omitted */ }
Data which is returned from Tree traversal, mapping internal segment value to segment(s)
which have been matched against the Request
path.
Data is Percent and UTF8 decoded.
Methods
impl<'a, 'b> SegmentMapping<'a, 'b>
[src]
fn get(&self, key: &'a str) -> Option<&Vec<&'b PercentDecoded>>
Returns a reference for Request
path segments mapped to the segment key.
fn contains_key(&self, key: &'a str) -> bool
Determines if Request
path segments are mapped to the segment key.
fn add_unmapped_segment(&mut self, key: &'a str)
Adds an empty value for a segment key, useful for segments that are considered
optional and haven't been explicitly provided as part of a Request
path
fn len(&self) -> usize
Number of segments from the Request path that have been mapped