pub struct ParsePathSegment<P>(/* private fields */);Expand description
A PathDescription which parses a single segment using the implementation of core::str::FromStr of T.
Trait Implementations§
Source§impl<P> Clone for ParsePathSegment<P>
impl<P> Clone for ParsePathSegment<P>
Source§impl<P> Debug for ParsePathSegment<P>
impl<P> Debug for ParsePathSegment<P>
Source§impl<CurrentPathParameters: PushPathSegmentParameter<P>, P: FromStr> PathDescription<CurrentPathParameters> for ParsePathSegment<P>
impl<CurrentPathParameters: PushPathSegmentParameter<P>, P: FromStr> PathDescription<CurrentPathParameters> for ParsePathSegment<P>
Source§type NewPathParameters = <CurrentPathParameters as PushPathSegmentParameter<P>>::NewPathParameters
type NewPathParameters = <CurrentPathParameters as PushPathSegmentParameter<P>>::NewPathParameters
The current path parameters, and the new path parameter, if any.
Source§fn parse_and_validate<'r, T, F: FnOnce(Self::NewPathParameters, Path<'r>) -> Result<T, Self::NewPathParameters>>(
&self,
current_path_parameters: CurrentPathParameters,
path: Path<'r>,
f: F,
) -> Result<T, CurrentPathParameters>
fn parse_and_validate<'r, T, F: FnOnce(Self::NewPathParameters, Path<'r>) -> Result<T, Self::NewPathParameters>>( &self, current_path_parameters: CurrentPathParameters, path: Path<'r>, f: F, ) -> Result<T, CurrentPathParameters>
Parse the section of the path described by
Self and then call the validation function with the new path parameters and the rest of the path.Source§fn parse_entire_path(
&self,
current_path_parameters: CurrentPathParameters,
path: Path<'_>,
) -> Result<Self::NewPathParameters, CurrentPathParameters>
fn parse_entire_path( &self, current_path_parameters: CurrentPathParameters, path: Path<'_>, ) -> Result<Self::NewPathParameters, CurrentPathParameters>
Parse the entire path, verifying that Self describes the entire path.
Source§fn parse_path_prefix<'r>(
&self,
current_path_parameters: CurrentPathParameters,
path: Path<'r>,
) -> Result<(Self::NewPathParameters, Path<'r>), CurrentPathParameters>
fn parse_path_prefix<'r>( &self, current_path_parameters: CurrentPathParameters, path: Path<'r>, ) -> Result<(Self::NewPathParameters, Path<'r>), CurrentPathParameters>
Parse the prefix of the path described by
Self, verifying that the rest of the path isn’t empty.impl<P> Copy for ParsePathSegment<P>
Auto Trait Implementations§
impl<P> Freeze for ParsePathSegment<P>
impl<P> RefUnwindSafe for ParsePathSegment<P>
impl<P> Send for ParsePathSegment<P>
impl<P> Sync for ParsePathSegment<P>
impl<P> Unpin for ParsePathSegment<P>
impl<P> UnwindSafe for ParsePathSegment<P>
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