pub struct Path<'r>(/* private fields */);Expand description
The URL-encoded path of the request
Implementations§
Source§impl<'r> Path<'r>
impl<'r> Path<'r>
Sourcepub fn split_first_segment(self) -> Option<(UrlEncodedString<'r>, Path<'r>)>
pub fn split_first_segment(self) -> Option<(UrlEncodedString<'r>, Path<'r>)>
Split the path into the first segment (everything before the first /) and the rest of the path.
If the path is empty, return None.
Sourcepub fn segments(self) -> PathSegments<'r> ⓘ
pub fn segments(self) -> PathSegments<'r> ⓘ
Iterate over the segments of the path, more or less split by /
Trait Implementations§
Source§impl<'r> IntoIterator for Path<'r>
impl<'r> IntoIterator for Path<'r>
impl<'r> Copy for Path<'r>
Auto Trait Implementations§
impl<'r> Freeze for Path<'r>
impl<'r> RefUnwindSafe for Path<'r>
impl<'r> Send for Path<'r>
impl<'r> Sync for Path<'r>
impl<'r> Unpin for Path<'r>
impl<'r> UnwindSafe for Path<'r>
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